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
Lever and Entity
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#2
RE: Lever and Entity

So...You want to pull a lever and have an entity appear/disappear?

You have it mostly right. You don't really need the variable, though.

For example, this should be a SetEntityConnectionStateChangeCallback

PHP Code: (Select All)
void OnStart()
{
??????(
"mechanismus2""lever2""????"truefalse0);
}

//Include this in your OnStart 
SetEntityConnectionStateChangeCallback("name of your lever""the function to call"); 

The callback function's syntax would look like this:

PHP Code: (Select All)
void YourFunction(string &in asEntityint alState)
{
  
//This checks what "state" the lever is in
  
if(alState == 1//1 is on, 0 is in between and -1 means off
  
{
     
//Do what you want to happen here
  
}


(This post was last modified: 05-07-2013, 04:06 PM by Tomato Cat.)
05-07-2013, 04:04 PM
Find


Messages In This Thread
Lever and Entity - by Smackdown - 05-07-2013, 03:45 PM
RE: Lever and Entity - by Tomato Cat - 05-07-2013, 04:04 PM
RE: Lever and Entity - by Smackdown - 05-07-2013, 04:32 PM
RE: Lever and Entity - by Tomato Cat - 05-07-2013, 04:41 PM
RE: Lever and Entity - by DnALANGE - 05-07-2013, 05:00 PM
RE: Lever and Entity - by Smackdown - 05-07-2013, 05:19 PM



Users browsing this thread: 1 Guest(s)