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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Path nodes
potu1304 Offline
Junior Member

Posts: 24
Threads: 9
Joined: Feb 2011
Reputation: 0
#1
Path nodes

Hello all!
I would like to know how I can find out the x,y and z cordinates and the distance to other pathnotes? Because the grunt should go a determined path and then it should dissapear.
Can anyone help?


And sorry for spelling and other mistakes.
(This post was last modified: 05-08-2011, 06:05 PM by potu1304.)
05-08-2011, 04:07 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: Path notes

Can't you just add pathnodes via the level editor and then create path nodes as usual via scripting? You never need to know coordinates.
05-08-2011, 04:28 PM
Find
potu1304 Offline
Junior Member

Posts: 24
Threads: 9
Joined: Feb 2011
Reputation: 0
#3
RE: Path notes

But when I read the path notes in other custom stories there is always a distance to other path notes
05-08-2011, 04:41 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#4
RE: Path notes

That file is created automatically if you use the AddPathNode() command.
05-08-2011, 05:07 PM
Find
potu1304 Offline
Junior Member

Posts: 24
Threads: 9
Joined: Feb 2011
Reputation: 0
#5
RE: Path notes

Ah ok can you maybe send me an example how a AddPathNode() can look like?
05-08-2011, 05:17 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#6
RE: Path notes

Sorry, didn't recall the exact function for the paths. Here:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "ActivateMonster", true, 1);
}

void ActivateMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
AddEnemyPatrolNode("Monster", "Path_1", 2.0f, ""); //Monster walks to pathnode Path_1 and waits for 2 seconds before moving to Path_2
AddEnemyPatrolNode("Monster", "Path_2", 1.0f, "");
}
05-08-2011, 05:28 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#7
RE: Path notes

You can also try this:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "ActivateMonster", true, 1);
}
void ActivateMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
int x = RandInt(0, 5);
for (int i = 1; i > 0 && i < 6; i++)
{
AddEnemyPatrolNode("Monster", "Path_"+i, x, "");
}
}
That would add a random time effect to 5 path nodes the monster could walk on.

Also by the way, the thread's title should read: "Path Nodes"

:p

(This post was last modified: 05-08-2011, 05:59 PM by Kyle.)
05-08-2011, 05:57 PM
Find




Users browsing this thread: 2 Guest(s)