Frictional Games Forum (read-only)

Full Version: tutorial on path nodes needed!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.)
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. :/
i did and nothing useful came up. honestly i couldnt find anything.
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");
}
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.
thx! it worked.
Here's a little nub question.
Code:
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", -->2.0f<--, "");

The "2.0f" makes the grunt stay at the pathnode for 2sec?
(05-30-2011, 07:51 AM)xtron Wrote: [ -> ]Here's a little nub question.
Code:
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", -->2.0f<--, "");

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

Yup.