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?
Hooumeri Offline
Member

Posts: 57
Threads: 11
Joined: Oct 2010
Reputation: 0
#4
RE: hw to make a lever functional?

(03-16-2011, 01:36 PM)Viperdream Wrote:
// 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 :<

He said he found it, just couldnt get it to work.

OP, you should post your script so we can see what's wrong.
03-16-2011, 05:26 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 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)