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

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Really need help with a monster loop.
Author Message
Mojake Offline
Junior Member

Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
SplitHeadProduction Offline
Junior Member

Posts: 28
Joined: Mar 2012
Reputation: 6
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Xanthos Offline
Senior Member

Posts: 322
Joined: Mar 2012
Reputation: 8
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




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