Frictional Games Forum (read-only)
Really need help with a monster loop. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Really need help with a monster loop. (/thread-14460.html)



Really need help with a monster loop. - Mojake - 04-03-2012

Been trying for hours to loop a monster and I just can't do it. Tried 'for' and everything; pretty new to scripting by the way. It's killing me, I just want a monster to follow a few path nodes along a corridor; then loop around a room. Somebody please help Undecided

I can make it follow the path nodes but the loop is out of the question Angry


RE: Really need help with a monster loop. - SplitHeadProduction - 04-03-2012

can you send me the script you have so far then i can see what's wrong


RE: Really need help with a monster loop. - Your Computer - 04-03-2012

Monsters become disabled when either the player is out of its activation distance or when they reach the last patrol node while the player doesn't see the monster. If you edit the monster, you can increase the activation distance and you can override AutoRemoveAtPathEnd in the user defined variables of the entity so that the monster doesn't get disabled when it reaches the final patrol node.

You do not have to continually add patrol nodes to the monster. There's a reason why they're called patrol nodes: the monster will loop through them automatically.


RE: Really need help with a monster loop. - Xanthos - 04-03-2012

Then just do
AddEntityCollideCallback("Grunt", "GruntLoop1", "Nodes1", false, 1);

AddEntityCollideCallback("Grunt", "GruntLoop2", "Nodes2", false, 1);

}


void Nodes1(string &in asParent, string &in asChild, int alState)
{
ClearEnemyPatrolNodes("Grunt");
AddEnemyPatrolNode("Grunt", "PathNodeArea_2", 1, "");
}


void Nodes2(string &in asParent, string &in asChild, int alState)
{
ClearEnemyPatrolNodes("Grunt");
AddEnemyPatrolNode("Grunt", "PathNodeArea_1", 1, "");
}