04-30-2011, 01:33 PM
04-30-2011, 01:40 PM
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?
Here I expained it to another person, I hope it helps you.
http://www.frictionalgames.com/forum/thread-7573.html?
04-30-2011, 01:42 PM
There is a script function you use.
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.
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.
04-30-2011, 01:46 PM
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
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
04-30-2011, 02:19 PM
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, "");
}
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, "");
}