Frictional Games Forum (read-only)
Follow nodes - 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: Follow nodes (/thread-7706.html)



Follow nodes - X4anco - 04-30-2011

Hello N00B here

How do you get monster to follow nodes?


RE: Follow nodes - Kyle - 04-30-2011

I had a feeling you would ask this.

Here I expained it to another person, I hope it helps you.

http://www.frictionalgames.com/forum/thread-7573.html?


RE: Follow nodes - TFEF - 04-30-2011

There is a script function you use.

Code:
AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

asName - internal name of the enemy
asNodeName - path node
afWaitTime - time in seconds that the enemy waits at the path node before continuing
asAnimation - the animation the enemy uses when reaching the path node (usually left blank)

EDIT: Ninja'd, link above should be pretty helpful if you need more clarification.


RE: Follow nodes - X4anco - 04-30-2011

Thank you so much but this is my code and how do I get the Monster to follow node?

Code:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Function01", true, 1);
}
void Function01(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
}
AddEnemyPatrolNode("Monster", "PathNodeArea_1", 5, "");

But all I want him to do is break a door


RE: Follow nodes - Kyle - 04-30-2011

You put his path nodes through a closed door and he'll break down through it.

Code should look like:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Function01", true, 1);
}
void Function01(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
AddEnemyPatrolNode("Monster", "PathNodeArea_1", 5, "");
}