I recently made a mission with the help of SaOk for Iron front. after the release I had a taste for more and I'm planning to take a second shot on developing a mission for ArmA2 this time.
This mission will involve various tasks which the player needs to complete before Exfil is possible, My goal on this mission is to make the player think before he acts. However I want to keep the mission as random as possible, to be more exact I like to add random patrols which the player will encounter trough the mission.
Ive been trying this script: Which uses an improved BIS fnc taskPatrolhttp://community.bistudio.com/wiki/BIS_fnc_taskPatrol
Calling the script with.
null = [group Ins_GrD2,(getPos Ins_GrD2),15.5] execVM "BIN_taskPatrol.sqf"
This patrol works great to a certain point, I like to use this for simple patrolling on the units and it keeps my editing work nice and tidy without to many way points on the map, on some of the units I use even no way-points at all.
However with the above script Air patrols seem to have trouble to find a good altitude and crashes a lot in to higher Areas around the operation area e.g. mountains or trees with only a altitude change about 300 to 390, I encountered this basically on shoppers. I tried to force them to a certain altitude using this on the units initialization field.
Ins_AirPat1 setPos [getPos Ins_AirPat1 select 0,getPos Ins_AirPat1 select 1,535]
and on the first way point on act field using this together with the code for the script,
Ins_AirPat1 flyInHeight 535; null = [group Ins_AirPat1,(getPos Ins_AirPat1),15.5] execVM "BIN_taskPatrol.sqf"
I also tried:
null = [group Ins_AirPat1,(getPos Ins_AirPat1),15.5] execVM "BIN_taskPatrol.sqf"; Ins_AirPat1 flyInHeight 535;
But this seems to brake the patrol code, the Aircraft cant deter-main a correct flight path anymore and keeps changing his altitude on the spot.
To counter this I tried to use this script in stead: UPS Script http://kronzky.info/ups/index.htm
Called with this code for ground patrols:
nul=[Ins_PsQ2,"PatrMark01","random","min:",0,"max:",1] execVM "ups.sqf"
nul=[Ins_PsQ3,"PatrMark01","random","min:",2,"max:",5] execVM "ups.sqf"
Called With this code for Air patrols or vehicles e.g. tanks, cars etc:
nul=[Ins_AirPat1,"PatrMark02","random"] execVM "ups.sqf"
The thing is that the same thing happens with the Air patrols, they are crashing in to the trees or higher areas which is not meant to be, also a secondary problem seems to happen with this script.
I like to use the first script on some of the units depending on what they need to do for the mission, however reading the description of the second patrol script the AI will act more natural on their patrols, standard the patrol script is written to make the AI move slowly in save mode like a normal patrol.
This works but only to a certain point, for some reason when I for example make a patrol with OPFOR side INS 4 men squad and let them spawn between 4 to 9 times in a marker area of 250 by 465 and test it with a unit on the same side no problems are detected. However when I put a BLUEFOR unit on the map then the strange thing happens and the AI will go in Alert mode instantly.
This also happens with this code:
nul=[this,"PatrMark01","random"] execVM "ups.sqf"
Whatever I do, when I place an enemy unit on the map instant alert status is applied on those groups or single units that are using the UPS scripting.The question is now.
1: Is it possible to make the Air patrols fly higher with aether this scripts or maybe a secondary script purely for Air patrols?
2: How do I fix the alert status issue with AI containing the UPS coding because they aren't meant to go in alert before they encounter or spot the player.
3: If you have any other suggestions Ill be glad to try them out.