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
house Offline
Member

Posts: 195
Threads: 11
Joined: Oct 2010
Reputation: 1
#1
Question  Lever Help

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.
(This post was last modified: 11-16-2010, 06:54 PM by house.)
11-16-2010, 06:52 PM
Find
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
house Offline
Member

Posts: 195
Threads: 11
Joined: Oct 2010
Reputation: 1
#3
RE: Lever Help

What you wrote is a little too complitcated to understand a little.
11-16-2010, 10:48 PM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#4
RE: Lever Help

Well, theres no simple function. Use it or lose it Smile
How else will you learn
11-17-2010, 03:39 AM
Find
house Offline
Member

Posts: 195
Threads: 11
Joined: Oct 2010
Reputation: 1
#5
RE: Lever Help

(11-17-2010, 03:39 AM)Chilton Wrote: Well, theres no simple function. Use it or lose it Smile
How else will you learn

He said he really didn't know how to use levers for scripting. ( Atleast I think. )
11-17-2010, 09:34 PM
Find




Users browsing this thread: 1 Guest(s)