mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
c020128f0e
Added the ability to defuse on explosives. "on explosives", there is a helper object that handles defusing. Known issue, it appears that the attachTo explosives don't detonate. This means the currently approach should be changed to a object variable method, instead of an attached object method.
29 lines
873 B
Plaintext
29 lines
873 B
Plaintext
/*
|
|
* Author: Garth 'L-H' de Wet
|
|
* Selects a trigger for an explosive.
|
|
*
|
|
* Arguments:
|
|
* 0: Explosive <OBJECT>
|
|
* 1: Magazine <STRING>
|
|
* 2: Trigger mode <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [_explosive, "SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger;
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
private ["_config"];
|
|
closeDialog 0;
|
|
call EFUNC(interaction,hideMenu);
|
|
EXPLODE_3_PVT(_this,_explosive,_magazine,_trigger);
|
|
_config = ConfigFile >> "CfgACE_Triggers" >> _trigger;
|
|
|
|
// If the onSetup function returns true, it is handled elsewhere
|
|
if (isText(_config >> "onSetup") && {[_explosive,_magazine] call compile getText (_config >> "onSetup")}) exitWith {};
|
|
|
|
[ACE_player, getPosATL _explosive, _explosive getVariable [QGVAR(Direction), 0],_magazine, _trigger, [], _explosive] call ACE_Explosives_fnc_placeExplosive;
|