Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help [SOLVED] Levers
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Levers

Levers work, with the thing called "alState".

This is the callback for a lever, placed in void OnStart() (For beginners)

PHP Code: (Select All)
SetEntityConnectionStateChangeCallback(stringasNamestringasCallback); 

The function will look like this:

PHP Code: (Select All)
void Func(string &in asEntityint alState
{
if(
alState == 1)
{
//If ON
}

if(
alState == -1)
{
//If OFF
}


Simply put in SetLampLit when ON and OFF, and put in false and true, for whatever your liking ^^

Trying is the first step to success.
(This post was last modified: 10-18-2014, 07:25 AM by FlawlessHappiness.)
10-18-2014, 07:20 AM
Find


Messages In This Thread
[SOLVED] Levers - by Straxedix - 10-18-2014, 07:06 AM
RE: Levers - by FlawlessHappiness - 10-18-2014, 07:20 AM
RE: Levers - by Straxedix - 10-18-2014, 07:25 AM
RE: Levers - by FlawlessHappiness - 10-18-2014, 07:28 AM
RE: Levers - by Straxedix - 10-18-2014, 07:35 AM
RE: Levers - by Straxedix - 10-18-2014, 08:38 AM
RE: Levers - by Straxedix - 10-18-2014, 10:20 AM
RE: Levers - by Slanderous - 10-18-2014, 11:41 AM
RE: Levers - by Straxedix - 10-19-2014, 09:04 AM
RE: Levers - by 7heDubz - 10-18-2014, 02:06 PM
RE: Levers - by Straxedix - 10-19-2014, 07:16 AM



Users browsing this thread: 1 Guest(s)