Frictional Games Forum (read-only)
tutorial on path nodes needed!! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: tutorial on path nodes needed!! (/thread-8333.html)



tutorial on path nodes needed!! - willochill - 05-29-2011

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


RE: tutorial on path nodes needed!! - Kyle - 05-29-2011

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. :/


RE: tutorial on path nodes needed!! - willochill - 05-30-2011

i did and nothing useful came up. honestly i couldnt find anything.


RE: tutorial on path nodes needed!! - triadtimes - 05-30-2011

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


RE: tutorial on path nodes needed!! - willochill - 05-30-2011

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



RE: tutorial on path nodes needed!! - triadtimes - 05-30-2011

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.


RE: tutorial on path nodes needed!! - willochill - 05-30-2011

thx! it worked.


RE: tutorial on path nodes needed!! - xtron - 05-30-2011

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?


RE: tutorial on path nodes needed!! - GraphicsKid - 05-30-2011

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