Frictional Games Forum (read-only)
Really weird enemy error - 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 weird enemy error (/thread-15581.html)



Really weird enemy error - Twitchez - 05-23-2012

Hey everyone!

Today, I encountered a really weird bug. After my brute has patrolled about 13 pathnodes, he just randomly vanishes. Here is my loop:

First, I call my monster with another function: AddTimer("", 2.0f, "Monster_Active_now"); , then when he walks into his 16th pathnode, he collides with a script entity which is: AddEntityCollideCallback("servant_brute_1", "Monster_Collide", "Run_Monster_Func01", false, 1);



void Run_Monster_Func01(string &in asParent, string &in asChild, int alState)
{
for (int i = 1; i <17; i++)
{
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_"+i, 0, "");
}
}

void Monster_Active_now(string &in asTimer)
{
for (int i = 1; i <17; i++)
{
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_"+i, 0, "");
}
}

But he never makes it until the 16th, he just dissapppears. Any ideas why?

//Kind Regards

Nevermind, I found the error myself. Close Thread..