ACE adds a dead man switch that you can wire to an explosive to give your enemies a nasty surprise if they dare harm you.
To make this possible for the AI, do the following:
1. Give the AI you want to trigger the explosive the dead man switch
AIman1 addItem "ace_deadmanswitch";
2. Place the explosive using this code:
explosiveID = [AIman1, getPosATL bomblocation, 0 (direction of explosive), "SatchelCharge_Remote_Mag" (explosive magazine), "DeadManSwitch", ] call ACE_Explosives_fnc_placeExplosive;
That should be all, but it won't work for AIs (it will on players). This might be fixed later.
In the meantime, to make the AI detonate the explosive when killed use the following code in a killed EH.
[AIman1, -1 (max detonator distance (-1 is unlimited)), [explosiveID, 1 (time delay)]] call ACE_Explosives_fnc_detonateExplosive;
The following explosives support dead man triggers:
SatchelCharge_Remote_Mag DemoCharge_Remote_Mag IEDUrbanBig_Remote_Mag IEDLandBig_Remote_Mag IEDUrbanSmall_Remote_Mag IEDLandSmall_Remote_Mag
Edited by VKing, 2015-05-19 @ 13:52.