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


Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lever Help
Hooumeri Offline
Member

Posts: 57
Threads: 11
Joined: Oct 2010
Reputation: 0
#2
RE: Lever Help

(11-16-2010, 06:52 PM)house Wrote: Can someone tell me how to make a lever stuck and when you pick up the lantern, its not stuck? One more thing, when you pull down the lever, can someone tell me how to make it so it unlocks a door? I'm making a custom story called Bio Lab. This is what I need for the story.

I'm not an expert on how to make levers work, but I would make two seperate levers. One of them does nothing, but as soon as you touch the lantern - the one that works will appear.

void OnStart()
{
AddEntityCollideCallback("Player", "lantern_01", "CollideLanternTouch_01", true, 1);

SetEntityConnectionStateChangeCallback("lever_nice01_1", "StateChangeLever");
}

void CollideLanternTouch_01(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("lever_nice01", false);
SetEntityActive("lever_nice01_1", false);
}

void StateChangeLever(string &in asEntity, int alState)
{
if(alState == 1){
SetLeverStuckState(asEntity, 1, true);
SetSwingDoorLocked("prison_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Player", 0.0, false);
}
}
(This post was last modified: 11-17-2010, 02:20 PM by Hooumeri.)
11-16-2010, 07:40 PM
Find


Messages In This Thread
Lever Help - by house - 11-16-2010, 06:52 PM
RE: Lever Help - by Hooumeri - 11-16-2010, 07:40 PM
RE: Lever Help - by house - 11-16-2010, 10:48 PM
RE: Lever Help - by Chilton - 11-17-2010, 03:39 AM
RE: Lever Help - by house - 11-17-2010, 09:34 PM



Users browsing this thread: 1 Guest(s)