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 Lever State
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#3
RE: Lever State

If there's only one lever, then you use SetEntityConnectionStateChangeCallback. For example, if you want something to happen when the lever's state is 1, you write:
PHP Code: (Select All)
void OnStart()
{
    
SetEntityConnectionStateChangeCallback("lever_1""LeverStateChange");
}

void LeverStateChange(string &in entityint state)
{
    if(
state == 1) {
        
// Do stuff
    
}


In Ruins [WIP]
03-29-2013, 09:39 PM
Find


Messages In This Thread



Users browsing this thread: 1 Guest(s)