Hi ruste
Oops ! It looks like I didn't make my script commentary clear enough. Sorry, my bad !
Here's a worked example -
First, create your man and call him (say) - bigfattarget.
Next, create a group of enemy and name the leader (say) - huntgroup1. In my mission I actually have lots of groups converging on the players from various directions so I named the groups after their town of origin - eg LaTrinite, Cancon, StPierre etc.
Now give this group a Seek and Destroy waypoint anywhere on the map and give it a radius of (say) 50m. Don't worry about where you put the waypoint, the script will keep moving it every 2 minutes or so anyway - that's its job !
Go back to your group leader and in his Init field type in - [huntgroup1, bigfattarget, 1] exec "huntToFrontContinuous.sqs"
Now test the mission and try not to get yourself tracked down and killed !
The first few times I tried it I kept getting run to ground and wiped out. I then learned a few tricks that made my job a LOT easier.
First - listen carefully. Once you hear that crow call you know that they're on to you (ie, within 400m). By the time you get the voice cues it may be too late - the close voice cue ("unit say . . . ") kicks in at only 50m so they may actually see you before you hear them !
Second - note that even though the baddies will continually keep circling in on your position, they won't know exactly where you are until they actually spot you or you do something stupid like fire at them. Until they spot you their search circle will be 400m - plenty of room for you to get lost in !
Once they spot you they become VERY hard to shake. Hide in bushes or buildings or use LOTS of third person views to keep trees and buildings between you and the bad guys. If worse comes to worse - RUN ! They probably won't keep up (at least in the short term) and you will be able to put some distance between you and them before they update their search pattern.
Third - zigzag frequently and often. The script continually works out your path of movement and sends the hunting groups to a point somewhere in front of you in this direction. If you don't move at all then the search is actually centered on your current position !
If you zig zag then they will keep moving to a point in front of your LAST direction of movement. If they are on foot then you should be able to keep them so confused and behind the curve that they'll never catch up !
Even if they have trucks then all that movement will mean that they will have little time to search - the AI spends most of its time loading and unloading ! Give your man a move order of some sort and try playing as a member of the hunt group for a bit and see what I mean !
Finally - if the bad guys are all over you then sometimes a few wild shots or grenades can make them stop and head for cover. You can then use that time to run, run and run some more !
Once you get ahead of a pursuing group then you should have no problems, especially if the baddies are on foot. That's why I play with one final trick . . . !
Try this -
Set up your man and a hunting group as detailed above. Now place another group (huntgroup2) at some point around the player's position. Give this group TWO waypoints - the first to Guard and the second to Seek and Destroy.
Now make an "enemy present" Trigger and link it to this new group's Guard waypoint. Edit the script in the hunters Init field to read
[huntgroup2, bigfattarget, 2] exec "huntToFrontContinuous.sqs"
Note the number "2", rather than 1 - this refers to the group's SECOND waypoint, not it's first.
Resize and move the trigger until it is in front of the player's escape route and voila - there you have it ! This new group will wait at its assigned Guard point until the player enters the trigger zone, then it will join in the hunt.
Tee hee ! :noo: :help:
Have fun with the script. I am finalising some fatigue, thirst and hunger scripts to go with it. You think running is hard ? Try running when you have to periodically stop to eat, drink and sleep !
Cheers !
Roni