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
Really need help with a monster loop.
Mojake Offline
Junior Member

Posts: 7
Threads: 6
Joined: Mar 2012
Reputation: 0
#1
Sad  Really need help with a monster loop.

Been trying for hours to loop a monster and I just can't do it. Tried 'for' and everything; pretty new to scripting by the way. It's killing me, I just want a monster to follow a few path nodes along a corridor; then loop around a room. Somebody please help Undecided

I can make it follow the path nodes but the loop is out of the question Angry
04-03-2012, 09:42 AM
Find Reply
SplitHeadProduction Offline
Junior Member

Posts: 28
Threads: 8
Joined: Mar 2012
Reputation: 6
#2
RE: Really need help with a monster loop.

can you send me the script you have so far then i can see what's wrong
04-03-2012, 10:15 AM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Really need help with a monster loop.

Monsters become disabled when either the player is out of its activation distance or when they reach the last patrol node while the player doesn't see the monster. If you edit the monster, you can increase the activation distance and you can override AutoRemoveAtPathEnd in the user defined variables of the entity so that the monster doesn't get disabled when it reaches the final patrol node.

You do not have to continually add patrol nodes to the monster. There's a reason why they're called patrol nodes: the monster will loop through them automatically.

Tutorials: From Noob to Pro
04-03-2012, 04:38 PM
Website Find Reply
Xanthos Offline
Senior Member

Posts: 318
Threads: 9
Joined: Mar 2012
Reputation: 8
#4
RE: Really need help with a monster loop.

Then just do
AddEntityCollideCallback("Grunt", "GruntLoop1", "Nodes1", false, 1);

AddEntityCollideCallback("Grunt", "GruntLoop2", "Nodes2", false, 1);

}


void Nodes1(string &in asParent, string &in asChild, int alState)
{
ClearEnemyPatrolNodes("Grunt");
AddEnemyPatrolNode("Grunt", "PathNodeArea_2", 1, "");
}


void Nodes2(string &in asParent, string &in asChild, int alState)
{
ClearEnemyPatrolNodes("Grunt");
AddEnemyPatrolNode("Grunt", "PathNodeArea_1", 1, "");
}

04-03-2012, 05:10 PM
Find Reply




Users browsing this thread: 1 Guest(s)