07-09-2011, 01:38 AM
This is driving me nuts. I am scripting it just like before and it doesn't work. But my other script works. I have no idea how to make this damn grunt just spawn and walk his darn path. It's impossible!
But here's my Script.
Now let me explain. Z1 = The Grunt that is Spawning. ZP Is the Script AREA. Can you tell me what is wrong?
But here's my Script.
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player" , "ZP" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Z1" , true);
AddEnemyPatrolNode("Z1", "Path1", 0, "");
AddEnemyPatrolNode("Z1", "Path2", 5, "");
AddEnemyPatrolNode("Z1", "Path3", 0, "");
AddEnemyPatrolNode("Z1", "Path4", 0, "");
}
{
AddEntityCollideCallback("Player" , "ZP" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Z1" , true);
AddEnemyPatrolNode("Z1", "Path1", 0, "");
AddEnemyPatrolNode("Z1", "Path2", 5, "");
AddEnemyPatrolNode("Z1", "Path3", 0, "");
AddEnemyPatrolNode("Z1", "Path4", 0, "");
}
Now let me explain. Z1 = The Grunt that is Spawning. ZP Is the Script AREA. Can you tell me what is wrong?