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
Spawning a monster
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#2
RE: Spawning a monster

Yes there is. In the beginning of the script there should be one;

Spoiler below!

////////////////////////////
// Run first time starting map
void OnStart()
{

}

And one;

////////////////////////////
// Run when entering map
void OnEnter()
{

}

And finally;

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


When you've got these three, you write all your callbacks into the;

////////////////////////////
// Run first time starting map
void OnStart()
{

}

if you now wanna make so the monster activates just copy this right here:

Spoiler below!

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "SpawnGrunt", "MonsterFunc1", true, 1);
}


////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

void MonsterFunc1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt", true);
}


06-23-2011, 02:49 AM
Find


Messages In This Thread
Spawning a monster - by Lontasm - 06-23-2011, 02:17 AM
RE: Spawning a monster - by rojkish - 06-23-2011, 02:49 AM
RE: Spawning a monster - by Lontasm - 06-23-2011, 03:31 AM



Users browsing this thread: 2 Guest(s)