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?
cheeseburgerXD Offline
Junior Member

Posts: 4
Threads: 2
Joined: Mar 2011
Reputation: 0
#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
house Offline
Member

Posts: 195
Threads: 11
Joined: Oct 2010
Reputation: 1
#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
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
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
Tottel Offline
Senior Member

Posts: 307
Threads: 9
Joined: Nov 2010
Reputation: 0
#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




Users browsing this thread: 1 Guest(s)