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:
|
|
|
|
* 0: Magazine <STRING>
|
|
|
|
* 1: Trigger mode <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* ["SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger;
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-13 21:21:31 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
private ["_magazine","_trigger"];
|
|
|
|
closeDialog 0;
|
|
|
|
_magazine = _this select 0;
|
|
|
|
_trigger = _this select 1;
|
2015-01-12 09:48:26 +00:00
|
|
|
_config = ConfigFile >> "CfgACE_Triggers" >> _trigger;
|
2015-01-15 19:13:12 +00:00
|
|
|
call EFUNC(interaction,hideMenu);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
// If the onSetup function returns true, it is handled elsewhere
|
|
|
|
if (isText(_config >> "onSetup") && {[_magazine] call compile getText (_config >> "onSetup")}) exitWith {};
|
|
|
|
|
2015-01-12 09:48:26 +00:00
|
|
|
[ACE_player, _magazine, _trigger] call FUNC(setupExplosive);
|