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
How do I make a lever???
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#4
RE: How do I make a lever???

there isn't any extremely difficult code to do, the principle is exactly the same as a script area. - A Callback is called then a function(such as Unlock) is run. The only difference is that the callback is a LeverState callback instead of a Collide Callback.

So first of all, unlike "AddEntityCollideCallback" there is no script function called for example... "AddLeverCallback"
You must Add the Callback in LevelEditor.

So click on the Lever, click the Tab on the right. Then scroll to ConnecctionStateChangeCallback, put a name in the box (Such as "OnLeverPull")

then in your code put:

void OnLeverPull(string &in asEntity , int alState)
{
if(alState==x){}
}

// - if(alState==x){} can be used to determine whether the lever is up or down. Good Luck Smile

(This post was last modified: 09-23-2011, 06:24 PM by DRedshot.)
09-23-2011, 06:22 PM
Find


Messages In This Thread
How do I make a lever??? - by Brute - 09-23-2011, 03:43 PM
RE: How do I make a lever??? - by Homicide13 - 09-23-2011, 04:37 PM
RE: How do I make a lever??? - by Brute - 09-23-2011, 05:48 PM
RE: How do I make a lever??? - by DRedshot - 09-23-2011, 06:22 PM
RE: How do I make a lever??? - by Brute - 09-24-2011, 08:13 AM
RE: How do I make a lever??? - by DRedshot - 09-24-2011, 08:51 AM
RE: How do I make a lever??? - by Brute - 09-24-2011, 11:52 AM
RE: How do I make a lever??? - by Brute - 09-24-2011, 03:21 PM



Users browsing this thread: 1 Guest(s)