Topic has been moved here instead.
If the superstallion has 20 cargo seats it should be possible to transport all the guys in the back, and it doesn't matter what groups they are in if you use the
get in waypoints or the moveInCargo scripting command. They will be in the same groups when they exit the helicopter.
To get the helicopter to circle above one of the groups, you could do the following:
1) Create a waypoint for your helicopter after the waypoint where it unloads the soldiers, make it a move waypoint if you want it to just hover, make it a seek and destroy waypoint if you want it to move around and engage targets.
2) In the activation field of the waypoint where the soldiers are unloaded, put this:
[helicoptername,unitname] exec "helicopterFollow.sqs"helicoptername is the name of the helicopter you want to control, unitname is a name of a unit in the group you want the helicopter to follow.
3) Open notepad and type in the following:
_helicopter = _this select 0
_unit = _this select 1
_helogroup = group _helicopter
_unitgroup = group _unit
; This makes sure the helo won't leave the waypoint over the group
_helogroup lockWP true
; Set a boolean to false so we can end the loop if we want
endHeloLoop = false
#loop
_unitleader = leader _unitgroup
[_helogroup,2] setWPPos (getPos _unitleader)
?!(alive _helicopter): exit
?!(alive _unitleader): goto "exit"
?(endHeloLoop): goto "exit"
~10
goto "loop"
#exit
; This let's the helicopter resume it's waypoints if none of the groupmembers are alive or if you end it manually.
_helogroup lockWP false
exit
Save the above as helicopterFollow.sqs in the mission folder.
3) Try the mission and see if it works as you wanted it to.
Some notes:
In this line:
[_helogroup,2] setWPPos (getPos _unitleader)you will need to edit the number 2 so it's the same number as the waypoint
following the one where you drop your soldiers off. It's easy to do this, simply press F4 and double-click on the waypoint you want, it says "#: Waypoint type" in a dropdown list at the top, add one to that number and it's the one you want. So if it says: 0: Move, change the script so it says 1 instead of 2, if it says 4: Move, make it so that the script says 5 and so forth.
This script works so that the helicopters waypoint is positioned at the position of the leader of the unit you passed into the script. If you make it a seek and destroy waypoint, the helicopter will constantly fly around and search for targets, and engage them if it finds any (if the helicopter is armed that is)
If the leader of the group dies, the script will continue to work as the next unit in line becomes the new leader, and if the last person dies, the script exits and lets the helicopter continue along it's waypoints (if it has any).
If you want to end the helicopters patrol before all the members of the group have been killed, simply type the following in a trigger or a waypoints on activation field:
endHeloLoop = trueThis is completely untested, so let me know if it works, it could be a neat trick
editI just tested it quickly myself, the best approach to get it to work is to do this:
Place a move or seek and destroy waypoint a ways off from the point where you drop off your ground forces.
Make a trigger activated by west, east or resistance (depends on which side your guys are on) and in it, place the code to execute the script, the
[helicoptername,unitname] exec "helicopterFollow.sqs" bit, this will make the helicopter come out of the area to escape ground fire, then turn around and come in over the group(s) to cover them. It looks very good when you do it on Ia Drang with the SEB Nampack units, nothing like a Huey that swoops out low over the trees and then comes back in and hovers above, covering you