Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Follow nodes
Author Message
X4anco Offline
Member

Posts: 157
Threads: 66
Joined: Apr 2011
Reputation: 0
#1
Follow nodes

Hello N00B here

How do you get monster to follow nodes?

...
04-30-2011, 01:33 PM
Find Reply
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#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 Reply
TFEF Offline
Member

Posts: 143
Threads: 0
Joined: Feb 2011
Reputation: 1
#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 Reply
X4anco Offline
Member

Posts: 157
Threads: 66
Joined: Apr 2011
Reputation: 0
#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 Reply
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#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 Reply




Users browsing this thread: 1 Guest(s)