PDA

View Full Version : [TUT] Ai follow tutorial.



adumass
August 25th, 2008, 02:11 PM
This is a quick tutorial I made for someone a while ago on making ai follow the player, hope it helps someone.

First set up your encounter, when you get to squads make four of them(You can have way more but I'm using four in this tutorial.) and don't set the actor type yet. Name them "squad a", "squad b", "squad c" and "squad d". (You don't need the quotes but it doesn't really matter.) The letters will make it easier for you to know what firing positions each squad is using. Set the firing positions for all of the boxes for "squad a" to A, for "squad b" to B etc. Set the "initial state" and "return state" to "guarding at guard position", check off the automatic migration flag in all squads. Set "maneuver to squad" to "squad a" for all squads, including squad a. Now set squad a's "actor type" to the actor variant tag that you want to use, also set the "normal and insane diff count" to anything you want. Place starting locations for squad a. Now its time to set up firing positions. (The ai will move from squad to squad when following, going to the squad closest to the player or object they are following.) So set the firing positions where you want the ai to go when following the player. The last thing you need to do is set up the script. Its Ai_follow_target_players (encounter name). I won't explain that since you probably already know.

Heres an example of how I would set firing positions for the ai to follow me closely through this tunnel. The colored areas represent the general area where I would place the firing positions(red=firing positions A etc).
http://img300.imageshack.us/img300/385/tut1tb4.jpg
http://img300.imageshack.us/img300/385/tut1tb4.jpg%5B/IMG%5D%5B/URL%5D%20%5BURL=http://g.imageshack.us/g.php?h=300&i=tut1tb4.jpg%5D%5BIMG%5Dhttp://img300.imageshack.us/img300/385/tut1tb4.1a20e3c00c.jpg

Ki11a_FTW
August 25th, 2008, 02:15 PM
GJ

Higuy
August 25th, 2008, 02:49 PM
Kewl never knew how to do that.

Pkmnrulz240
August 25th, 2008, 06:47 PM
Awesome dude! Good to finally see a clean tutorial on this. :lol:

Ro0ster
August 25th, 2008, 11:53 PM
The second picture doesn't show for me.

Ki11a_FTW
August 26th, 2008, 12:13 AM
theirs only 1 picture :-o

Delta4907
August 26th, 2008, 04:49 PM
Yea there is 2 pics, i see a small white box with a red X under the first pic :P

L0d3x
August 26th, 2008, 05:30 PM
Very useful as a reference, good job!