Surrender script.DescriptionA script that allows you to set an enemy group so that it surrenders after a certain number of group members are dead. Once the conditions are met the surrendering units drop their weapons on the ground, put their hands behind their heads and are set as captives. You can then move up to them and get them to join your group and move them to a friendly prison or drop-off point. The captured units can at no time carry weapons, drive vehicles or operate on-board weapon systems.
ScriptYou can get the latest version of surrender script from here:
http://home.iprimus.com.au/simonnsl/ACE/capture_test_10.Intro.zip Instructions for test missionMove south and shoot an OPFOR unit from each of the two enemy groups. The remaining units will drop there weapons and then put hands behind their heads and will be made setCaptive true (ie. turn blue on the map). Move next to one and an action to "take prisoner" should appear. Capture and then wait a few seconds the prisoner will join your group. Then take him back north and send him just between the barbed wire in front of the tents. He should resume the hands behind head animation and then after a couple of seconds he will disappear. You will get a message POW returned for interrogation. If you shoot units that have surrended you will get a message. If you order a POW to take a weapon he will immediately put it down again so he cannot be used as a BLUFOR unit.
You can change the number of OPFOR units that need to be shot before the group surrenders in the init.sqf in the line:
{[_x, 2, _allies] execVM "NORRN_capture\group_surrender.sqf"} forEach _enemy_groups_high_morale;
You'll need a player in the leader's slot (or you'll have to shoot the AI leader so leadership passes down the group) or have the AI disabled.
To implement * Copy across the text from the init.sqf and NORRN_capture folder to your mission file.
*All the units in the surrendering groups will have to be named in the editor as well as the surrender groups themselves eg east_1 = group this.
*Update the code in the init.sqf - you have to put allies and enemys generic unit types and also the names of the enemy groups that you want to surrender in _enemy_groups_high_morale and _enemy_groups_low_morale lines. There's two lines as you may want different groups to surrender when different numbers of troops die.
*You'll need a marker on the map called "prison". This is where the enemy units will leave your group.
*Make sure that the rank of the group leader of friendly units is higher than the rank of the captured units
*If you don't want captured units boarding a vehicle or chopper in the gunner or driver slots you'll need to put this code in the int line of the vehicle.Code:
this addEventHandler ["GETIN", {if ((_this select 1) == "driver" && (_this select 2) isKindOf "soldierEB" || (_this select 1) == "gunner" && (_this select 2) isKindOf "soldierEB") then {(_this select 2) action ["GETOUT", (_this select 0)] }}];
- you may need to adapt this if the surrendering units are not OPFOR
TestedOn both ArmA 1.08 and 1.09 and JIP