Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connecting levers
Author Message
Sprytny Offline
Junior Member

Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #1
Connecting levers

Hi,
I want to make the key appear when i pull all four levers down. There is some code i have already generated:


}
ConnectEntities("","lever_1","metaldoor_1key", true, 1, "Levers");
}
void Levers(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState)
{
SetLeverStuckState(asMainEntity, 1, true);
SetEntityActive("metaldoor_1key", true);
}

I woudl like to extend this to add a few more levers. Any ideas?
(This post was last modified: 04-23-2012 06:01 PM by Sprytny.)
04-23-2012 05:59 PM
Find all posts by this user Quote this message in a reply
LulleBulle Offline
Member

Posts: 102
Joined: Feb 2012
Reputation: 0
Post: #2
RE: Connecting levers

http://wiki.frictionalgames.com/hpl2/tut...pen_a_door
http://wiki.frictionalgames.com/hpl2/tut...cretshelfs


Try one of those. Also please search the wiki before asking questions.
04-23-2012 06:32 PM
Find all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #3
RE: Connecting levers

The key line that you're looking for, might me this one:
if(GetLocalVarInt("VarLever_1") == 1 && GetLocalVarInt("VarLever_2") == 1 && GetLocalVarInt("VarLever_3") == 1 && GetLocalVarInt("VarLever_4") == 1)
{
// Activate key.

}

Noob scripting tutorial: From Noob to Pro

(This post was last modified: 04-23-2012 06:45 PM by Cranky Old Man.)
04-23-2012 06:44 PM
Find all posts by this user Quote this message in a reply
Sprytny Offline
Junior Member

Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #4
RE: Connecting levers

@LulleBulle
I will, sorry for that but i coudn't find that. Next time I gonna search better.

Thank you both Smile Works well!!!
04-23-2012 07:23 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)