Hey guys,
So I was using this
guide to set up a grunt that patrols his route more than just once, but it just won't work.
I set ActivationDistance to 1000 and added <Var Name="AutoRemoveAtPathEnd" Value="false" /> to the .ent file
what am I missing?
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);
}