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
Script Help Make an script work when Pick up key?
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#4
RE: Make an script work when Pick up key?

If you want something to happen when you pick up the key, you will need to use this:

void OnStart()
{
SetEntityCallbackFunc("name_of_your_key", "PickUpKeyFunc");
}

void PickUpKeyFunc(string &in entity, string &in type)
{
if(type == "OnPickup")
{
// Put everything you want to happen here after you have picked up your key.
}
}

So, if you have a script area that is inactive in the level editor and want to be active, you could put a SetEntityActive("Your_Script_Area", true); inside the PickUpKeyFunc.
(This post was last modified: 06-13-2012, 08:34 AM by Mackiiboy.)
06-13-2012, 08:32 AM
Website Find


Messages In This Thread
RE: Make an script work when Pick up key? - by Mackiiboy - 06-13-2012, 08:32 AM



Users browsing this thread: 3 Guest(s)