mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Explosives are now placed first and then the trigger is set afterwards.
This commit is contained in:
@ -3,24 +3,39 @@
|
||||
* Opens the UI for timer setting of an explosive
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Magazine <STRING>
|
||||
* 0: Explosive <OBJECT>
|
||||
* 1: Magazine <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* ["SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_openTimerSetUI;
|
||||
* [_explosive, "SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_openTimerSetUI;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_mag"];
|
||||
_mag = _this select 0;
|
||||
EXPLODE_2_PVT(_this,_explosive,_mag);
|
||||
createDialog "RscACE_SelectTimeUI";
|
||||
sliderSetRange [8845, 5, 900]; // 5seconds - 15minutes
|
||||
sliderSetPosition [8845, 30];
|
||||
|
||||
buttonSetAction [8860, format[QUOTE([ARR_4(ACE_player,'%1','Timer',floor sliderPosition 8845)] call FUNC(setupExplosive);closeDialog 0;), _mag]];
|
||||
buttonSetAction [8855, format[QUOTE(['%1'] call FUNC(openTriggerSelectionUI);), _mag]];
|
||||
GVAR(explosive) = _explosive;
|
||||
|
||||
DFUNC(SetTimer) = {
|
||||
[
|
||||
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;
|
||||
};
|
||||
|
||||
buttonSetAction [8860, QUOTE(call DFUNC(SetTimer);)];
|
||||
buttonSetAction [8855, QUOTE(closeDialog 0;)];
|
||||
|
||||
ctrlSetText [8870, format[localize "STR_ACE_Explosives_TimerMenu",0, 30]];
|
||||
|
Reference in New Issue
Block a user