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
Script Help How do i make a lever that removes something?
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: How do i make a lever that removes something?

SetEntityConnectionStateChangeCallback
as well as
SetEntityActive

Will do so.

Example
PHP Code: (Select All)
void OnStart()
{
    
SetEntityConnectionStateChangeCallback("lever_1""LeverPulled");
}
void LeverPulled(string &in asEntityint alState)
{
    if(
alState == 1)
    {
        
SetEntityActive("entity_1"false);
        
SetLeverStuckState("lever_1"1true);
    }


11-08-2011, 08:46 PM
Find


Messages In This Thread
RE: How do i make a lever that removes something? - by Obliviator27 - 11-08-2011, 08:46 PM



Users browsing this thread: 2 Guest(s)