2015-01-12 09:48:26 +00:00
|
|
|
/*
|
2015-02-02 08:35:17 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Opens the UI for timer setting of an explosive
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-02-20 01:28:16 +00:00
|
|
|
* 0: Explosive <OBJECT>
|
|
|
|
* 1: Magazine <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"] call ACE_Explosives_fnc_openTimerSetUI;
|
2015-02-02 08:35:17 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-13 21:21:31 +00:00
|
|
|
#include "script_component.hpp"
|
2015-02-20 01:28:16 +00:00
|
|
|
EXPLODE_2_PVT(_this,_explosive,_mag);
|
2015-01-12 09:48:26 +00:00
|
|
|
createDialog "RscACE_SelectTimeUI";
|
|
|
|
sliderSetRange [8845, 5, 900]; // 5seconds - 15minutes
|
|
|
|
sliderSetPosition [8845, 30];
|
|
|
|
|
2015-02-20 01:28:16 +00:00
|
|
|
GVAR(explosive) = _explosive;
|
|
|
|
|
|
|
|
DFUNC(SetTimer) = {
|
2015-04-06 20:20:11 +00:00
|
|
|
[
|
|
|
|
ACE_player,
|
|
|
|
getPosATL GVAR(explosive),
|
|
|
|
GVAR(explosive) getVariable QGVAR(Direction),
|
|
|
|
GVAR(explosive) getVariable QGVAR(class),
|
|
|
|
"Timer",
|
|
|
|
[floor sliderPosition 8845],
|
|
|
|
GVAR(explosive)
|
|
|
|
] call FUNC(placeExplosive);
|
|
|
|
closeDialog 0;
|
2015-02-20 01:28:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buttonSetAction [8860, QUOTE(call DFUNC(SetTimer);)];
|
|
|
|
buttonSetAction [8855, QUOTE(closeDialog 0;)];
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-05-28 19:59:04 +00:00
|
|
|
ctrlSetText [8870, format[localize LSTRING(TimerMenu),0, 30]];
|