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
Looping? (Still need help)
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#27
RE: Looping? (Still need help)

Here's the script mentioned earlier that I ususally refer to, with some explanation added. For loops are fairly advanced scripting, though, so it takes some studying.

It repeats the function multiple times, and the second number (9 in my script) should be one more than the number of pathnodes. All your pathnodes should be numbered in order in the route you want your monster to take.

PHP Code: (Select All)
for (int i 09i++)  //repeats function for values of i from 1 to 9
    
{
        if (
== 9)
        {
            
0;    //when i reaches 9, it resets to 0 instead, restarting the counter
        
}
        
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_"+i0.001f"");  //adds patrol nodes for enemy looping from 1 to 8
    


Your enemy will still deactivate if you hide from it, though, even if it hasn't finished its loop.

(This post was last modified: 06-25-2012, 08:09 AM by Damascus.)
06-25-2012, 08:08 AM
Find


Messages In This Thread
Looping? (Still need help) - by SiderealStop - 06-24-2012, 02:39 PM
RE: Looping? - by Rapture - 06-24-2012, 03:19 PM
RE: Looping? - by SiderealStop - 06-24-2012, 03:37 PM
RE: Looping? - by SilentStriker - 06-24-2012, 05:02 PM
RE: Looping? - by SiderealStop - 06-24-2012, 06:15 PM
RE: Looping? - by Cruzore - 06-24-2012, 06:28 PM
RE: Looping? - by SiderealStop - 06-24-2012, 07:22 PM
RE: Looping? - by Cruzore - 06-24-2012, 07:28 PM
RE: Looping? - by SiderealStop - 06-24-2012, 07:42 PM
RE: Looping? - by Cruzore - 06-24-2012, 07:48 PM
RE: Looping? - by SiderealStop - 06-24-2012, 08:06 PM
RE: Looping? - by Cruzore - 06-24-2012, 08:07 PM
RE: Looping? - by SiderealStop - 06-24-2012, 08:15 PM
RE: Looping? - by Cruzore - 06-24-2012, 08:19 PM
RE: Looping? - by SiderealStop - 06-24-2012, 08:23 PM
RE: Looping? - by Cruzore - 06-24-2012, 08:28 PM
RE: Looping? - by SiderealStop - 06-24-2012, 08:33 PM
RE: Looping? - by Cruzore - 06-24-2012, 08:46 PM
RE: Looping? - by SiderealStop - 06-24-2012, 08:52 PM
RE: Looping? - by Cruzore - 06-24-2012, 08:55 PM
RE: Looping? - by SiderealStop - 06-24-2012, 09:02 PM
RE: Looping? - by Cruzore - 06-24-2012, 09:05 PM
RE: Looping? - by SiderealStop - 06-24-2012, 09:07 PM
RE: Looping? (Still need help) - by Cruzore - 06-24-2012, 09:21 PM
RE: Looping? (Still need help) - by SiderealStop - 06-24-2012, 10:00 PM
RE: Looping? (Still need help) - by Your Computer - 06-25-2012, 12:51 AM
RE: Looping? (Still need help) - by Damascus - 06-25-2012, 08:08 AM
RE: Looping? (Still need help) - by SiderealStop - 06-25-2012, 05:51 PM
RE: Looping? (Still need help) - by Damascus - 06-25-2012, 06:51 PM
RE: Looping? (Still need help) - by Cruzore - 06-25-2012, 07:00 PM
RE: Looping? (Still need help) - by SiderealStop - 06-26-2012, 04:44 PM



Users browsing this thread: 1 Guest(s)