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
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#15
RE: Lever help

PHP Code: (Select All)
void OnStart()

{

AddEntityCollideCallback("cog_1""Cog1""Elevator_start"true1);

AddEntityCollideCallback("cog_2""Cog2""Elevator_start"true1);

AddEntityCollideCallback("cog_3""Cog3""Elevator_start"true1);

SetEntityConnectionStateChangeCallback("elevator_machine_main_lever_1""e_lever");

SetEntityConnectionStateChangeCallback("elevator_lever_1""ele_lever");

SetLocalVarInt("CogCount"0); //I added this because I found out the LocalVarInt hasn't been called yet.

SetLocalVarInt("MachineryRun"0);

}





void Elevator_start(string &in asParentstring &in asChildint alState)

{

        
AddLocalVarInt("CogCount"1);

        if (
GetLocalVarInt("CogCount")==3)

    {

        
SetLeverStuckState("elevator_machine_main_lever_1"0true);

    }

}



void e_lever(string &in asEntityint alState)

{

    
SetEntityActive("ScriptArea_1"true);    

    
SetLeverStuckState("elevator_lever_1"0true);

    
RotatePropToSpeed("elevator_machine_cog_main_1"11.5100false"");

    
RotatePropToSpeed("elevator_machine_cog_small_3"11.5100false"");

    
RotatePropToSpeed("elevator_machine_cog_small_2"11.5001false"");

    
RotatePropToSpeed("elevator_machine_cog_small_1"11.5001false"");

    
RotatePropToSpeed("cog_1"11.5001false"");

    
RotatePropToSpeed("cog_2"11.5001false"");

    
RotatePropToSpeed("cog_3"11.5001false"");

    
PlaySoundAtEntity("""13_press_done.snt""Player"0false);

    
PlaySoundAtEntity("""13_machine_run_custom.snt""elevator_machine_cog_small_2"0false);

AddLocalVarInt("MachineryRun"1);

}



void ele_lever(string &in asEntityint alState)

{

    if(
GetLocalVarInt("MachineryRun") == 1);

        {

        
PlaySoundAtEntity("""14_elevator_activate.snt""Player"0false);

    
PlaySoundAtEntity("""elevator_move_normal.snt""Player"0false);

    
AddTimer("T1"4.0f"Timer_2");

        }

}



void Timer_2(string &in asTimer)

{

    
ChangeMap("Dungeons_1.map""PlayerStartArea_1""""");

}



void OnEnter()

{

    
PlayMusic("10_amb.ogg"true220true);        

}





void OnLeave()

{


There was an extra ;. My mind is not cooperating.

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-06-2013, 03: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)