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: Monster spawns when picked up a key
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#2
RE: Script help: Monster spawns when picked up a key

There are multiple ways to do this, I prefer this one.


void OnStart()
{
SetEntityCallbackFunc("NAMEofKEY", "OnPickup");
}
void OnPickup(string &in asEntity, string &in type)
{
if(asEntity == "NAMEofKEY")
{
SetEntityActive("NAMEofYOURMONSTER", true);
}
}


Just make sure to UNCHECK "active" under the monstername in the level editor.
06-30-2012, 07:36 PM
Find


Messages In This Thread
RE: Script help: Monster spawns when picked up a key - by ApeCake - 06-30-2012, 07:36 PM



Users browsing this thread: 1 Guest(s)