ACE3/addons/explosives/functions/fnc_selectTrigger.sqf

29 lines
745 B
Plaintext
Raw Normal View History

/*
* 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
*/
#include "script_component.hpp"
private ["_magazine","_trigger"];
closeDialog 0;
_magazine = _this select 0;
_trigger = _this select 1;
_config = ConfigFile >> "CfgACE_Triggers" >> _trigger;
2015-01-15 19:13:12 +00:00
call EFUNC(interaction,hideMenu);
// If the onSetup function returns true, it is handled elsewhere
if (isText(_config >> "onSetup") && {[_magazine] call compile getText (_config >> "onSetup")}) exitWith {};
[ACE_player, _magazine, _trigger] call FUNC(setupExplosive);