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 you make a monster spawn and then he leaves and you can hear a door opened.
narutohokager Offline
Member

Posts: 149
Threads: 28
Joined: Jan 2011
Reputation: 0
#4
RE: How do you make a monster spawn and then he leaves and you can hear a door opened.

You can put a collider for the monster, and one for the player who activates the monster
void OnStart
{
AddEntityCollideCallback("Grunt_1", "AreaGruntDeact", "CollideAreaGruntDeact", true, 1);
AddEntityCollideCallback("Player", "AreaGruntActive", "CollideAreaGruntActive", true, 1);
}

void CollideAreaGruntActive(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Grunt_1", true);
AddEnemyPatrolNode("Grunt_1", "PathNodeArea_1", 0, "");
}

void CollideAreaGruntDeact(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Grunt_1", false);
PlaySoundAtEntity("", "SOUNDNAME", "DOORNAME", 0, false);
}

Sorry for my bad english
Amnesia The Revenge - Chapter 1
(This post was last modified: 08-22-2011, 02:17 PM by narutohokager.)
08-22-2011, 02:16 PM
Website Find


Messages In This Thread
RE: How do you make a monster spawn and then he leaves and you can hear a door opened. - by narutohokager - 08-22-2011, 02:16 PM



Users browsing this thread: 1 Guest(s)