Frictional Games Forum (read-only)

Full Version: How do I - disable all hints/turn on lights with a switch?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(08-05-2013, 09:01 AM)Smoke Wrote: [ -> ]Are the lights off when you enter the room or are you trying to switch them off?

For right now they are set off but later on I want them to be on and me enter a script area where they all turn off and then I have to flip a fuse to turn them all back on.
You'll have to change
Code:
SetLocalVarInt("candlestick_wall_1", 1);
to
Code:
SetLocalVarInt("candlestick_wall_1", 0);
so it'll direct the script to the part where it turns the lights on instead of where it turns the lights off.
(08-05-2013, 09:06 AM)Smoke Wrote: [ -> ]You'll have to change
Code:
SetLocalVarInt("candlestick_wall_1", 1);
to
Code:
SetLocalVarInt("candlestick_wall_1", 0);
so it'll direct the script to the part where it turns the lights on instead of where it turns the lights off.

Okay very nice but it still turns off and on afterwards simply by clicking on the lever, is that normal?
No it's not normal, at least not for the effect you're intending.

Here's the problem:

Code:
SetEntityPlayerInteractCallback("lever_nice01_1", "LightsFunction", false);


You're using SetEntityPlayerInteractCallback which means it will trigger instantly whenever the player interacts with it, for example simply touching it.

Use this instead:

Code:
SetEntityConnectionStateChangeCallback("lever_nice01_1", "LightsFunction");

Take a look here for a tutorial on a similar matter: http://wiki.frictionalgames.com/hpl2/tut...cretshelfs
Oh it was a lever! I'm sorry, I thought you had a switch.. I think kreekakon answered your question Smile
Thank you both of you, this issue has been taken care of once and for all!!! Big Grin

Now does anyone know how to disable all hints? Lol.
(08-05-2013, 10:48 AM)goregrinder99 Wrote: [ -> ]Thank you both of you, this issue has been taken care of once and for all!!! Big Grin

Now does anyone know how to disable all hints? Lol.

Code:
void RemoveHint (string& asName);
void BlockHint (string& asName);
void UnBlockHint (string& asName);

asName - Name of the Hint.

Note that you have to use this for every hint.
(08-05-2013, 11:40 AM)JustAnotherPlayer Wrote: [ -> ]
(08-05-2013, 10:48 AM)goregrinder99 Wrote: [ -> ]Thank you both of you, this issue has been taken care of once and for all!!! Big Grin

Now does anyone know how to disable all hints? Lol.

Code:
void RemoveHint (string& asName);
void BlockHint (string& asName);
void UnBlockHint (string& asName);

asName - Name of the Hint.

Note that you have to use this for every hint.

I removed the Hints section in the menu.cfg, problem eliminated. Wink No more hints.
Pages: 1 2