2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-01-12 09:48:26 +00:00
|
|
|
Name: ACE_Explosives_fnc_selectTrigger
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Author: Garth de Wet (LH)
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Description:
|
|
|
|
Selects a trigger for an explosive.
|
2015-01-12 09:48:26 +00:00
|
|
|
|
|
|
|
Parameters:
|
2015-01-11 16:42:31 +00:00
|
|
|
0: String - Magazine
|
2015-01-12 09:48:26 +00:00
|
|
|
1: String - trigger index in ACE_triggers of magazine class
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Returns:
|
|
|
|
Nothing
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Example:
|
2015-01-12 09:48:26 +00:00
|
|
|
["SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger;
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
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;
|
|
|
|
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);
|