Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Expert Scripters needed
Angerpull Offline
Member

Posts: 88
Threads: 24
Joined: Jun 2011
Reputation: 0
#1
Expert Scripters needed

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?
(This post was last modified: 07-09-2011, 03:03 AM by Angerpull.)
07-09-2011, 01:38 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Expert Scripters needed

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
Find
Angerpull Offline
Member

Posts: 88
Threads: 24
Joined: Jun 2011
Reputation: 0
#3
RE: Expert Scripters needed

(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.

07-09-2011, 03:03 AM
Find




Users browsing this thread: 1 Guest(s)