Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Follow nodes
Author Message
X4anco Offline
Member

Posts: 151
Joined: Apr 2011
Reputation: 0
Post: #1
Follow nodes

Hello N00B here

How do you get monster to follow nodes?

...
04-30-2011 01:33 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #2
RE: 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?

04-30-2011 01:40 PM
Find all posts by this user Quote this message in a reply
TFEF Offline
Member

Posts: 143
Joined: Feb 2011
Reputation: 1
Post: #3
RE: Follow nodes

There is a script function you use.

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.
(This post was last modified: 04-30-2011 01:44 PM by TFEF.)
04-30-2011 01:42 PM
Find all posts by this user Quote this message in a reply
X4anco Offline
Member

Posts: 151
Joined: Apr 2011
Reputation: 0
Post: #4
RE: Follow nodes

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

...
04-30-2011 01:46 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #5
RE: Follow nodes

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

04-30-2011 02:19 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)