RE: Enemy Patrol Problem
Just a question here. Why would you need such big activation distance? And besides, if that don't work, try to just add a script at the last pathnode the enemy takes.
For example:
This triggers
void GruntPatrolNode(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("nomusic_grunt_1", true);
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_4", 0, "");
}
void LoopGruntPatrol(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("nomusic_grunt_1", "PathNodeArea_4", 0, "");
}
void OnStart()
{
AddEntityCollideCallback("Player", "AreaStartGrunt", "GruntPatrolNode", true, 1);
AddEntityCollideCallback("nomusic_grunt_1", "AreaGruntLoopPatrol", "LoopGruntPatrol", false, 1);
}
(This post was last modified: 12-14-2013, 12:09 PM by Neelke.)
|