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
Quick Question.
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#7
RE: Quick Question.

OnStart(){
SetEntityPlayerInteractCallback("yourmonsterspawndoor", "SpawnMonster", true);
}

void SpawnMonster(string &in asEntity){
//Add your monster spawning stuff here
AddEntityCollideCallback("Player", "yourescapedoorarea", "CloseDoor", true, 1);
}

void CloseDoor(string &in asParent, string &in asChild, alState){
SetSwingDoorClosed("yourescapedoor", true, true);
}

1 is when you enter your area, -1 when you leave it, and 0 for both.

So what the script does:
When you touch the door, you add your monster stuff, like spawning.
After that it activates an entity collide callback, which triggers, when
the player enters your escapearea in front of your escapedoor.
Then it closes, and the payer lost some seconds Smile

The Well: Descent - Take a look at it!
07-26-2011, 10:57 AM
Find


Messages In This Thread
Quick Question. - by GreyFox - 07-26-2011, 01:22 AM
RE: Quick Question. - by Obliviator27 - 07-26-2011, 01:27 AM
RE: Quick Question. - by GreyFox - 07-26-2011, 01:56 AM
RE: Quick Question. - by Obliviator27 - 07-26-2011, 03:00 AM
RE: Quick Question. - by GreyFox - 07-26-2011, 05:36 AM
RE: Quick Question. - by Wonderbread - 07-26-2011, 06:20 AM
RE: Quick Question. - by MrCookieh - 07-26-2011, 10:57 AM
RE: Quick Question. - by GreyFox - 07-26-2011, 03:54 PM



Users browsing this thread: 1 Guest(s)