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
hw to make a lever functional?
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#3
RE: hw to make a lever functional?

// Callback function for when the lever's state changes
// EntityName is the name of the lever
// alState is the current state of the lever, -1 being low, 0 middle and 1 high *
void OnLeverStateChange(string &in EntityName, int alState)
{
    // Do something when the state changes
        // Optional debug message
    AddDebugMessage(EntityName + "'s current state: " + alState, false);

    if (alState == -1)
    {
        // Do something if the lever's state is low (or change it to 0 or 1)
    }
}
// * low, middle and high are relative to its rotation.

Got it from the script recollection's thread. It's in the stickies. It's not that hard to find :<

03-16-2011, 01:36 PM
Find


Messages In This Thread
RE: hw to make a lever functional? - by house - 03-16-2011, 06:20 AM
RE: hw to make a lever functional? - by Viperdream - 03-16-2011, 01:36 PM
RE: hw to make a lever functional? - by Hooumeri - 03-16-2011, 05:26 PM
RE: hw to make a lever functional? - by Tottel - 03-16-2011, 06:45 PM



Users browsing this thread: 1 Guest(s)