2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-02 08:35:17 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Selects a trigger for an explosive.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-02-20 01:28:16 +00:00
|
|
|
* 0: Explosive <OBJECT>
|
|
|
|
* 1: Magazine <STRING>
|
|
|
|
* 2: Trigger mode <STRING>
|
2015-02-02 08:35:17 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2015-02-20 01:28:16 +00:00
|
|
|
* [_explosive, "SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger;
|
2015-02-02 08:35:17 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-13 21:21:31 +00:00
|
|
|
#include "script_component.hpp"
|
2015-03-31 17:26:38 +00:00
|
|
|
private ["_config"];
|
2015-01-11 16:42:31 +00:00
|
|
|
closeDialog 0;
|
2015-01-15 19:13:12 +00:00
|
|
|
call EFUNC(interaction,hideMenu);
|
2015-02-20 01:28:16 +00:00
|
|
|
EXPLODE_3_PVT(_this,_explosive,_magazine,_trigger);
|
|
|
|
_config = ConfigFile >> "CfgACE_Triggers" >> _trigger;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
// If the onSetup function returns true, it is handled elsewhere
|
2015-02-20 01:28:16 +00:00
|
|
|
if (isText(_config >> "onSetup") && {[_explosive,_magazine] call compile getText (_config >> "onSetup")}) exitWith {};
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-02-20 01:28:16 +00:00
|
|
|
[ACE_player, getPosATL _explosive, _explosive getVariable [QGVAR(Direction), 0],_magazine, _trigger, [], _explosive] call ACE_Explosives_fnc_placeExplosive;
|