Frictional Games Forum (read-only)
How do I - disable all hints/turn on lights with a switch? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: How do I - disable all hints/turn on lights with a switch? (/thread-22327.html)

Pages: 1 2


RE: How do I - disable all hints/turn on lights with a switch? - GoreGrinder99 - 08-05-2013

(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.


RE: How do I - disable all hints/turn on lights with a switch? - OriginalUsername - 08-05-2013

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.


RE: How do I - disable all hints/turn on lights with a switch? - GoreGrinder99 - 08-05-2013

(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?


RE: How do I - disable all hints/turn on lights with a switch? - Kreekakon - 08-05-2013

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/tutorials/script/levers_and_secretshelfs


RE: How do I - disable all hints/turn on lights with a switch? - OriginalUsername - 08-05-2013

Oh it was a lever! I'm sorry, I thought you had a switch.. I think kreekakon answered your question Smile


RE: How do I - disable all hints/turn on lights with a switch? - GoreGrinder99 - 08-05-2013

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.


RE: How do I - disable all hints/turn on lights with a switch? - PutraenusAlivius - 08-05-2013

(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.


RE: How do I - disable all hints/turn on lights with a switch? - GoreGrinder99 - 08-05-2013

(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.