Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hw to make a lever functional?
Author Message
cheeseburgerXD Offline
Junior Member

Posts: 4
Joined: Mar 2011
Reputation: 0
Post: #1
hw to make a lever functional?
i saw the lever script in the script recollections and i follow it but it wont workAngryAngry this may be a noob question but can someone help me out
03-16-2011 04:57 AM
Find all posts by this user Quote this message in a reply
house Offline
Member

Posts: 195
Joined: Oct 2010
Reputation: 1
Post: #2
RE: hw to make a lever functional?
Two of this forum?

I never knew how to make a lever, I made a thread, but no good anwsers.
03-16-2011 06:20 AM
Find all posts by this user Quote this message in a reply
Viperdream Offline
Member

Posts: 124
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Hooumeri Offline
Member

Posts: 57
Joined: Oct 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Tottel Offline
Senior Member

Posts: 307
Joined: Nov 2010
Reputation: 0
Post: #5
RE: hw to make a lever functional?
If he wants help, then he can at least post some more details.
03-16-2011 06:45 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)