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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lever help
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#8
RE: Lever help

I'm assuming the elevator lever is stuck in the map editor, right?

Lets say it's stuck at -1. "Down", I think. When you pull the elevator machinery lever, it unsticks the elevator lever to 0. Which is calling the StateChangeCallback, thus changing your map. See, it calls the function when the state changes, regardless of whether it's 1, 0, or -1.

Obviously that isn't what you wish to have happen, so you'll have to change it. Try this:

PHP Code: (Select All)
void ele_lever(string &in asEntityint alState)
{

    if(
alState == 1//Up, I think
    
{
       
PlaySoundAtEntity("""14_elevator_activate.snt""Player"0false);
       
PlaySoundAtEntity("""elevator_move_normal.snt""Player"0false);
       
AddTimer("T1"4.0f"Timer_2");
     }

(This post was last modified: 05-01-2013, 09:57 PM by Tomato Cat.)
05-01-2013, 09:44 PM
Find


Messages In This Thread
Lever help - by Storfigge - 05-01-2013, 06:11 PM
RE: Lever help - by OriginalUsername - 05-01-2013, 06:19 PM
RE: Lever help - by WALP - 05-01-2013, 06:21 PM
RE: Lever help - by Storfigge - 05-01-2013, 06:32 PM
RE: Lever help - by PutraenusAlivius - 05-02-2013, 01:33 PM
RE: Lever help - by WALP - 05-01-2013, 07:08 PM
RE: Lever help - by Tomato Cat - 05-01-2013, 07:16 PM
RE: Lever help - by Storfigge - 05-01-2013, 08:40 PM
RE: Lever help - by Tomato Cat - 05-01-2013, 09:44 PM
RE: Lever help - by Storfigge - 05-02-2013, 01:22 PM
RE: Lever help - by Tomato Cat - 05-02-2013, 03:11 PM
RE: Lever help - by Storfigge - 05-05-2013, 06:11 PM
RE: Lever help - by Tomato Cat - 05-05-2013, 06:20 PM
RE: Lever help - by Storfigge - 05-06-2013, 01:43 PM
RE: Lever help - by Storfigge - 05-06-2013, 04:00 PM
RE: Lever help - by PutraenusAlivius - 05-06-2013, 03:44 PM



Users browsing this thread: 1 Guest(s)