03-15-2012, 07:34 PM
Hey there, I'm looking to have a monster continuously walk around a certain path. I know how to move him from each path node to the next, but then he disappears after the last one. I know it's different than just using "AddEnemyPatrolNode" over and over again. Any help would be appreciated. Here's my script.
void OnEnter()
{
SetEntityPlayerInteractCallback("cellarkey_1", "ActivateBrute", true);
}
void ActivateBrute(string &in asEntity)
{
PlayMusic("10_event_coming.ogg", false, 1.0, 0, 5, false);
SetEntityActive("brute_1", true);
AddEnemyPatrolNode("brute_1", "Path_1", 2, "");
AddEnemyPatrolNode("brute_1", "Path_2", 0, "");
AddEnemyPatrolNode("brute_1", "Path_3", 0, "");
AddEnemyPatrolNode("brute_1", "Path_4", 0, "");
AddEnemyPatrolNode("brute_1", "Path_5", 0, "");
AddEnemyPatrolNode("brute_1", "Path_6", 0, "");
AddEnemyPatrolNode("brute_1", "Path_7", 0, "");
}
Spoiler below!
void OnEnter()
{
SetEntityPlayerInteractCallback("cellarkey_1", "ActivateBrute", true);
}
void ActivateBrute(string &in asEntity)
{
PlayMusic("10_event_coming.ogg", false, 1.0, 0, 5, false);
SetEntityActive("brute_1", true);
AddEnemyPatrolNode("brute_1", "Path_1", 2, "");
AddEnemyPatrolNode("brute_1", "Path_2", 0, "");
AddEnemyPatrolNode("brute_1", "Path_3", 0, "");
AddEnemyPatrolNode("brute_1", "Path_4", 0, "");
AddEnemyPatrolNode("brute_1", "Path_5", 0, "");
AddEnemyPatrolNode("brute_1", "Path_6", 0, "");
AddEnemyPatrolNode("brute_1", "Path_7", 0, "");
}