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


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tutorial on path nodes needed!!
willochill Offline
Member

Posts: 73
Threads: 27
Joined: Apr 2011
Reputation: 0
#1
tutorial on path nodes needed!!

can anyone give me a tutorial on path nodes, like just in general, how to create a path for a specific enemy and how to make them go from one node to another? i really dont understand, like ive tried and nothings working, i tried adding path nodes in my map and scripting them in the script but that didn't work. what do i do to create a monster path?
(also btw plz dont give me a tutorial where i have to make a new map and everything, just tell me how to do it in any map.)
05-29-2011, 11:16 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: tutorial on path nodes needed!!

Try searching pathnodes in the search bar. That's what you should do before making a thread or stuff that's been said again and again. :/

05-29-2011, 11:27 PM
Find
willochill Offline
Member

Posts: 73
Threads: 27
Joined: Apr 2011
Reputation: 0
#3
RE: tutorial on path nodes needed!!

i did and nothing useful came up. honestly i couldnt find anything.
05-30-2011, 12:24 AM
Find
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#4
RE: tutorial on path nodes needed!!

You must have missed this then.
http://www.frictionalgames.com/forum/thread-7764.html

05-30-2011, 12:46 AM
Find
willochill Offline
Member

Posts: 73
Threads: 27
Joined: Apr 2011
Reputation: 0
#5
RE: tutorial on path nodes needed!!

well according to that tutorial i did everything rite, but my monster still just stands there not going on any path. i have the pathnodes set up in the map and everything, and i double checked to make sure all my node names in the script matched up with the ones in the map. i posted my script below, what am i doing wrong?
void OnStart()
{
AddEntityCollideCallback("Player", "AreaActivateGrunt", "Func01", false, 1);
AddEntityCollideCallback("servant_grunt_1", "AreaDisableGrunt", "Func02", false, 1);
AddUseItemCallback("", "studykey", "mansion_3", "UnlockStudyHallway", true);
PlayMusic("00_creak.ogg", true, 1.0f, 0, 0, true);
}
void Func01(string &in asParent, string &in asChild, int alState)
{
if (HasItem("lantern_1") == true)
{
SetEntityActive("servant_grunt_1", true);
RemoveEntityCollideCallback("Player", "AreaActivateGrunt"); return;
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 4.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 2.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 2.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 2.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 2.0f, "");
}
}
void Func02(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
}
void UnlockStudyHallway(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("studykey");
}
05-30-2011, 02:08 AM
Find
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#6
RE: tutorial on path nodes needed!!

Get rid of the return; because that renders the rest of your pathnodes null. I just tried it out on one of my maps and it should solve the problem.

05-30-2011, 02:25 AM
Find
willochill Offline
Member

Posts: 73
Threads: 27
Joined: Apr 2011
Reputation: 0
#7
RE: tutorial on path nodes needed!!

thx! it worked.
05-30-2011, 03:46 AM
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#8
RE: tutorial on path nodes needed!!

Here's a little nub question.
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", -->2.0f<--, "");

The "2.0f" makes the grunt stay at the pathnode for 2sec?

[Image: 44917299.jpg]Dubstep <3
05-30-2011, 07:51 AM
Find
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#9
RE: tutorial on path nodes needed!!

(05-30-2011, 07:51 AM)xtron Wrote: Here's a little nub question.
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", -->2.0f<--, "");

The "2.0f" makes the grunt stay at the pathnode for 2sec?

Yup.
05-30-2011, 08:41 AM
Find




Users browsing this thread: 1 Guest(s)