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
Urgently need help, loop monster path.
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#3
RE: Urgently need help, loop monster path.

    for(int i=0;i<5;i++) {
        if(i == 5) {
            i = 0;
            }
        
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_"+i, 0.0f, "");
        }

This works if you want him to go in a continuous loop. Just change add 1 to i< for however nodes you want him to loop. i.e, you wanted 4 nodes, so I put i<5. That's just the way I do it though, since I usually start i at 0. However, this way he will still eventually dissapear if the player hides from him, i'm not too sure how to stop that myself.
03-17-2012, 12:15 PM
Find


Messages In This Thread
RE: Urgently need help, loop monster path. - by Equil - 03-17-2012, 12:15 PM



Users browsing this thread: 1 Guest(s)