Frictional Games Forum (read-only)

Full Version: Expert Scripters needed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.

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, "");
}

Now let me explain. Z1 = The Grunt that is Spawning. ZP Is the Script AREA. Can you tell me what is wrong?
It should work.

Make sure that name of the monster in the level editor is called "Z1" and the Script Area in which the player collides with to spawn the monster is has the right name in the level editor.

Also check and make sure that the patrol nodes are named correctly too.

Make sure that the type of Area for "Path1" through "Path4" are "PathNode".

Once you check all of this and all of it is correct. Perhaps post a picture that shows your map with those path nodes in which could be the path nodes' positions that cause it to mess up.
(07-09-2011, 02:31 AM)Kyle Wrote: [ -> ]It should work.

Make sure that name of the monster in the level editor is called "Z1" and the Script Area in which the player collides with to spawn the monster is has the right name in the level editor.

Also check and make sure that the patrol nodes are named correctly too.

Make sure that the type of Area for "Path1" through "Path4" are "PathNode".

Once you check all of this and all of it is correct. Perhaps post a picture that shows your map with those path nodes in which could be the path nodes' positions that cause it to mess up.

I made it work, it was just a stupid mistake by me.