Frictional Games Forum (read-only)

Full Version: [HELP] Enemy Pathing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to make an enemy repeat its path nodes?
You can refer to this recent thread for help on that:

http://www.frictionalgames.com/forum/thread-16458.html
Yes, like this. Create a timer telling the enemies to patrol the nodes you want, then have that timer call upon itself at the end. They will loop the path until 'RemoveTimer' is called in another script.
Quote:void patrol_1(string &in asTimer)
{
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddTimer("patrol_1", 2.0f, "patrol_1");
}