Frictional Games Forum (read-only)

Full Version: Follow nodes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello N00B here

How do you get monster to follow nodes?
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?
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.
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
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, "");
}