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
Script Help Looping Monster Path?
BadCoverMan Offline
Junior Member

Posts: 27
Threads: 7
Joined: Feb 2012
Reputation: 0
#1
Looping Monster Path?

Hey there, I'm looking to have a monster continuously walk around a certain path. I know how to move him from each path node to the next, but then he disappears after the last one. I know it's different than just using "AddEnemyPatrolNode" over and over again. Any help would be appreciated. Here's my script.

Spoiler below!

void OnEnter()
{
SetEntityPlayerInteractCallback("cellarkey_1", "ActivateBrute", true);
}

void ActivateBrute(string &in asEntity)
{
PlayMusic("10_event_coming.ogg", false, 1.0, 0, 5, false);
SetEntityActive("brute_1", true);
AddEnemyPatrolNode("brute_1", "Path_1", 2, "");
AddEnemyPatrolNode("brute_1", "Path_2", 0, "");
AddEnemyPatrolNode("brute_1", "Path_3", 0, "");
AddEnemyPatrolNode("brute_1", "Path_4", 0, "");
AddEnemyPatrolNode("brute_1", "Path_5", 0, "");
AddEnemyPatrolNode("brute_1", "Path_6", 0, "");
AddEnemyPatrolNode("brute_1", "Path_7", 0, "");
}


03-15-2012, 07:34 PM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#2
RE: Looping Monster Path?

void ActivateBrute(string &in asEntity)
{
PlayMusic(...);
SetEntityActive(...);
for(;Wink //That means an infinite loop, with no condition or danger of stopping.
{
for(int i = 1; i < 8; i++)
{
AddEnemyPatrolNode("brute_1", "Path_"+i, 0, "");
}
}
}

(This post was last modified: 03-15-2012, 08:00 PM by ClayPigeon.)
03-15-2012, 07:54 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Looping Monster Path?

Using enemy_suiter_basile or enemy_suiter_malo should work so long as the player is within the monster's activation distance.

Tutorials: From Noob to Pro
03-16-2012, 02:52 AM
Website Find




Users browsing this thread: 1 Guest(s)