Sauron The King
Junior Member
Posts: 42
Threads: 10
Joined: Oct 2011
Reputation:
0
|
Monster keeps disappearing
Hello,
I'm making a custom story. When you come at a new area, a monster will spawn. He will keep patrolling around 30 pathnodes. But after a while he will just disappear. But if I follow him quietly and don't lose my eye on him, he won't dissappear, because than he will just keep following the Pathnodes.
How can I make the monster keep looping his patroll, so he will never stop or dissapear? (until I reach a certain area, but he will disappear already if I reach a certain area early).
I have pasted the part of the patrolling monster right down here. Who can help?
void OnEnter()
{
AddEntityCollideCallback("Player", "Monster_sleepingrooms", "Grunt_Sleepingrooms", true, 1);
}
void Grunt_Sleepingrooms(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Grunt_Sleepingrooms", true);
PlayMusic("search_grunt.ogg", true, 2, 0, 1, true);
{for (int x = 0; x <= 4; x += 1)
{ AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_16", 2, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_30", 4, "");
}
}
}
|
|