Really weird enemy error
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..
(This post was last modified: 05-23-2012, 03:21 PM by Twitchez.)
|