Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I - disable all hints/turn on lights with a switch?
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#11
RE: How do I - disable all hints/turn on lights with a switch?

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

-Grind to the Gore-
08-05-2013, 09:03 AM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#12
RE: How do I - disable all hints/turn on lights with a switch?

You'll have to change
SetLocalVarInt("candlestick_wall_1", 1);
to
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
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#13
RE: How do I - disable all hints/turn on lights with a switch?

(08-05-2013, 09:06 AM)Smoke Wrote: You'll have to change
SetLocalVarInt("candlestick_wall_1", 1);
to
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?

-Grind to the Gore-
08-05-2013, 09:35 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#14
RE: How do I - disable all hints/turn on lights with a switch?

No it's not normal, at least not for the effect you're intending.

Here's the problem:

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:

SetEntityConnectionStateChangeCallback("lever_nice01_1", "LightsFunction");

Take a look here for a tutorial on a similar matter: http://wiki.frictionalgames.com/hpl2/tut...cretshelfs

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 08-05-2013, 10:00 AM by Kreekakon.)
08-05-2013, 09:55 AM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#15
RE: How do I - disable all hints/turn on lights with a switch?

Oh it was a lever! I'm sorry, I thought you had a switch.. I think kreekakon answered your question Smile
08-05-2013, 10:05 AM
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#16
RE: How do I - disable all hints/turn on lights with a switch?

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.

-Grind to the Gore-
(This post was last modified: 08-05-2013, 11:32 AM by GoreGrinder99.)
08-05-2013, 10:48 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#17
RE: How do I - disable all hints/turn on lights with a switch?

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

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.

"Veni, vidi, vici."
"I came, I saw, I conquered."
08-05-2013, 11:40 AM
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#18
RE: How do I - disable all hints/turn on lights with a switch?

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

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.

-Grind to the Gore-
(This post was last modified: 08-05-2013, 01:53 PM by GoreGrinder99.)
08-05-2013, 01:48 PM
Find




Users browsing this thread: 2 Guest(s)