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
Infinite Patroling
RedMser Offline
Junior Member

Posts: 40
Threads: 12
Joined: Mar 2012
Reputation: 1
#1
Infinite Patroling

So, as the title says, how to make any enemy patrol forever, like basile in Justine? Normally, when making serval patrol nodes, the enemy goes away after doing those, but how did they do that with basile so he just patrols forever and never goes away? The script didn't help and I am sorry if I am just stupid, but I need a quick answer. Thanks! Cool
03-31-2012, 06:30 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Infinite Patroling

http://www.frictionalgames.com/forum/thr...#pid124701

Also, keep in mind that a monster will deactivate if the player is out of its activation distance.

Tutorials: From Noob to Pro
03-31-2012, 06:43 PM
Website Find Reply
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#3
RE: Infinite Patroling

Is there a way to change that? I don't think basille deactivated like that, and maybe it's just something you have to change in the entity file.

03-31-2012, 09:34 PM
Find Reply
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#4
RE: Infinite Patroling

If you want to make a monster patrol infinitely, pick two of path nodes which the monster will move along. If it's a linear path, choose the two end points, if it's a circular or other irregular path, just choose any two that are decently far apart.


Around each path node, create a script area. Add an entity collide callback between the monster and each script area. When the monster collides with one area, run a function which adds patrol nodes leading to the OTHER area, and vice versa. This way, the monster will always be moving because it always has somewhere to go. Shouldn't be any issue if the player is seen by the monster, since it will return to its last path node and continue its scripted path when it stops hunting/searching for the player.

(This post was last modified: 03-31-2012, 09:54 PM by palistov.)
03-31-2012, 09:54 PM
Find Reply
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#5
RE: Infinite Patroling

Or...

for(;;)
{    
    for(int i = 1; i < howmuchpatrolnodesyouhave+1; i++)
    {
       AddEnemyPatrolNode("enemy", "patrol_node_names_"+i, 0);    
    }
}

I think this should work...
(This post was last modified: 03-31-2012, 11:06 PM by ClayPigeon.)
03-31-2012, 11:05 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Infinite Patroling

You can edit the monster to increase the activation distance. Likewise, you can set AutoRemoveAtPathEnd to false in the .ent file. This is all that is required. Using script areas with "collision patrolling" (if you will) does not do away with the activation distance issue. Constantly adding the patrol nodes to the monster doesn't get rid of the activation distance issue either, plus the patrol nodes remain in the monster's "memory" until cleared anyway. Also, having an infinite loop can prevent the game from working.

Tutorials: From Noob to Pro
03-31-2012, 11:45 PM
Website Find Reply




Users browsing this thread: 1 Guest(s)