10-21-2010, 06:17 PM
Hi,
I set up a path for a grunt and also placed the correct script into the file.
The monster also walks that path just perfectly. The problem is: Instead of disappearing after the last pathnode, it just walks through the entire patrol again, even when it doesn't see me (because I'm hiding in a closet).
Here's the script:
I set up a path for a grunt and also placed the correct script into the file.
The monster also walks that path just perfectly. The problem is: Instead of disappearing after the last pathnode, it just walks through the entire patrol again, even when it doesn't see me (because I'm hiding in a closet).
Here's the script:
Code:
void OnStart()
{
StopMusic(3.0f, 0);
PlaySoundAtEntity("", "door_level_cellar_close.snt", "level_celler_1", 0, false);
PlayMusic("01_amb_darkness.ogg", true, 80, 1, 0, false);
CompleteQuest("00Investigate","00Investigate");
AddEntityCollideCallback("Player", "activateScare", "ScareZoneEnable", true, 1);
AddEnemyPatrolNode("cellargrunt", "cellar_pn1", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn2", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn3", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn4", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn5", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn6", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn7", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn8", 0, "");
}