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
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