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 monster appear with a trigger (solution)
TEJR Offline
Junior Member

Posts: 11
Threads: 3
Joined: Feb 2011
Reputation: 0
#11
RE: How do i make a monster appear with a trigger

(10-18-2010, 08:06 PM)Kyle Wrote: Here ya go. "ScriptArea_1" is the name of the script area where you collide which causes the monster to spawn. "MonsterFunc1" is the name of the function used later on when you want to add to the script instead of it doing nothing. "servant_grunt" is the name of the monster that spawns. If you don't know how to actually place a scriptarea or to place and setup a monster, then ask me. Smile

void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt" , true);
}

Ok thanke you but where i must put this text? (i mean this script)
02-10-2011, 05:56 PM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#12
RE: How do i make a monster appear with a trigger (solution)

In the same folder as your map.
If your map is called "castle.map" the script file has to be "castle.hps".
You can edit those files with a texteditor.

[Image: 18694.png]
02-10-2011, 06:04 PM
Find




Users browsing this thread: 1 Guest(s)