mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #122 from KoffeinFlummi/ExplosivesHeaderFix
Fixed the headers of the explosives system to be the correct style.
This commit is contained in:
@ -1,21 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: XEH_postInit.sqf
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Initialises the player object for the explosive system.
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* None
|
||||||
Description:
|
*
|
||||||
Initialises explosive behaviour.
|
* Return Value:
|
||||||
|
* None
|
||||||
Parameters:
|
*
|
||||||
None
|
* Example:
|
||||||
|
* None
|
||||||
Returns:
|
*
|
||||||
None
|
* Public: No
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
None
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
if !(hasInterface) exitWith {};
|
if !(hasInterface) exitWith {};
|
||||||
GVAR(PlacedCount) = 0;
|
GVAR(PlacedCount) = 0;
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: XEH_preInit.sqf
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Initialises the explosives system
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* None
|
||||||
Description:
|
*
|
||||||
Prepares the functions
|
* Return Value:
|
||||||
|
* None
|
||||||
Parameters:
|
*
|
||||||
None
|
* Example:
|
||||||
|
* None
|
||||||
Returns:
|
*
|
||||||
None
|
* Public: No
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
None
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
ADDON = false;
|
ADDON = false;
|
||||||
|
@ -1,24 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_addClacker
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Adds an explosive as a clacker item to the passed unit if the unit has the required item.
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
Description:
|
* 1: Explosive <OBJECT>
|
||||||
Adds an explosive as a clacker item to the passed unit if the unit has a ACE_Clacker item.
|
* 2: Magazine classname <STRING>
|
||||||
|
* 3: Extra variables <ARRAY>
|
||||||
Parameters:
|
*
|
||||||
0: OBJECT - unit
|
* Return Value:
|
||||||
1: OBJECT - Explosive
|
* None
|
||||||
2: STRING - Magazine
|
*
|
||||||
3: ARRAY - Extra vars
|
* Example:
|
||||||
|
* [player, _explosive, "SatchelCharge_Remote_Mag", [ConfigFile >> "CfgACE_Triggers" >> "Command"]] call ACE_Explosives_fnc_addClacker;
|
||||||
Returns:
|
*
|
||||||
Nothing
|
* Public: Yes
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
[_unit, _explosive, "SatchelCharge_Remote_Mag", [ConfigFile >> "CfgACE_Triggers" >> "Command"]] call ACE_Explosives_fnc_AddClacker;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit", "_explosive", "_clacker", "_config", "_magazineClass", "_requiredItems", "_hasRequired"];
|
private ["_unit", "_explosive", "_clacker", "_config", "_magazineClass", "_requiredItems", "_hasRequired"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_canDefuse
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Whether a unit can perform the defuse action
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Checks if a unit can defuse an explosive
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* Able to defuse <BOOL>
|
||||||
0: OBJECT - unit
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* if ([player] call ACE_Explosives_fnc_canDefuse) then {hint "Can Defuse";};
|
||||||
Nothing
|
*
|
||||||
|
* Public: Yes
|
||||||
Example:
|
*/
|
||||||
[player] call ACE_Explosives_fnc_CanDefuse;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private "_unit";
|
private "_unit";
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
@ -24,7 +22,7 @@ _isSpecialist = [_unit] call EFUNC(Common,isEOD);
|
|||||||
if (GVAR(RequireSpecialist) && {!_isSpecialist}) exitWith {false};
|
if (GVAR(RequireSpecialist) && {!_isSpecialist}) exitWith {false};
|
||||||
|
|
||||||
_timeBombCore = nearestObject [_unit, "TimeBombCore"];
|
_timeBombCore = nearestObject [_unit, "TimeBombCore"];
|
||||||
_mineBase = nearestObject [_unit, "MineBase"];
|
_mineBase = nearestObject [_unit, "MineBase"];
|
||||||
|
|
||||||
_distCore = _unit distance _timeBombCore;
|
_distCore = _unit distance _timeBombCore;
|
||||||
_distBase = _unit distance _mineBase;
|
_distBase = _unit distance _mineBase;
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_canDetonate
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Whether the unit is able to detonate explosives
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Checks if a unit can detonate an explosive
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* Able to detonate <BOOL>
|
||||||
0: OBJECT - unit
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* if ([player] call ACE_Explosives_fnc_canDetonate) then { hint "Can Detonate"; };
|
||||||
BOOLEAN - if the unit has explosives and detonators.
|
*
|
||||||
|
* Public: Yes
|
||||||
Example:
|
*/
|
||||||
[player] call ACE_Explosives_fnc_canDetonate;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private "_unit";
|
private "_unit";
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_defuseExplosive
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Causes the unit to defuse the passed explosive.
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Defuses an Explosive
|
* 1: Explosive <OBJECT>
|
||||||
|
*
|
||||||
Parameters:
|
* Return Value:
|
||||||
0: OBJECT - unit
|
* None
|
||||||
1: OBJECT - Explosive
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* [player, ACE_Interaction_Target] call ACE_Explosives_fnc_defuseExplosive;
|
||||||
Nothing
|
*
|
||||||
|
* Public: Yes
|
||||||
Example:
|
*/
|
||||||
[player, ACE_Interaction_Target] call ACE_Explosives_fnc_defuseExplosive;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit", "_explosive"];
|
private ["_unit", "_explosive"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,26 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_detonateExplosive
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Causes the unit to detonate the passed explosive.
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
Description:
|
* 1: Max range (-1 to ignore) <NUMBER>
|
||||||
Detonates a remote Explosive.
|
* 2: Explosive <ARRAY>
|
||||||
|
* 0: Explosive <OBJECT>
|
||||||
Parameters:
|
* 1: Fuse time <NUMBER>
|
||||||
0: OBJECT - Unit detonating explosive
|
*
|
||||||
1: NUMBER - Max range (-1 to ignore)
|
* Return Value:
|
||||||
2: ARRAY - Explosive
|
* None
|
||||||
0: OBJECT - Explosive
|
*
|
||||||
1: NUMBER - Fuse Time
|
* Example:
|
||||||
|
* [player, 100, [Explosive, 1]] call ACE_Explosives_fnc_detonateExplosive; // has to be within range
|
||||||
Returns:
|
* [player, -1, [Explosive, 1]] call ACE_Explosives_fnc_detonateExplosive; // range ignored.
|
||||||
Nothing
|
*
|
||||||
|
* Public: Yes
|
||||||
Example:
|
*/
|
||||||
// Clacker
|
|
||||||
[player, 100, [Explosive, 1]] call ACE_Explosives_fnc_detonateExplosive;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_item","_result", "_ignoreRange", "_unit", "_range"];
|
private ["_item","_result", "_ignoreRange", "_unit", "_range"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
@ -44,8 +41,11 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhe
|
|||||||
_exp setPosASL _pos;
|
_exp setPosASL _pos;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_item spawn {
|
[{
|
||||||
sleep (_this select 1);
|
_explosive = _this;
|
||||||
(_this select 0) setDamage 1;
|
if (!isNull _explosive) then {
|
||||||
};
|
_explosive setDamage 1;
|
||||||
|
};
|
||||||
|
}, _item select 0, _item select 1, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
|
||||||
_result
|
_result
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_getDetonators
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Returns all the detonators of the unit
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
Description:
|
*
|
||||||
Gets all the detonators of a specific unit
|
* Return Value:
|
||||||
|
* Configs of all detonators <ARRAY>
|
||||||
Parameters:
|
*
|
||||||
0: OBJECT - Unit to get detonators of
|
* Example:
|
||||||
|
* _detonators = [player] call ACE_Explosives_fnc_getDetonators;
|
||||||
Returns:
|
*
|
||||||
ARRAY - Configs of all detonators.
|
* Public: Yes
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
_detonators = [player] call ACE_Explosives_fnc_getDetonators;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit", "_items", "_result", "_config"];
|
private ["_unit", "_items", "_result", "_config"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,22 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_getPlacedExplosives
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Gets all placed explosives by unit, optionally filtered by specific trigger type.
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Gets all placed explosives, whether Clacker based or not.
|
* 1: Trigger classname - filter (optional) <STRING>
|
||||||
|
*
|
||||||
Parameters:
|
* Return Value:
|
||||||
0: OBJECT - unit
|
* Explosives <ARRAY>
|
||||||
1: STRING - (OPTIONAL) Trigger classname for filter.
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* _allExplosives = [player] call ACE_Explosives_fnc_getPlacedExplosives;
|
||||||
Array: Explosives.
|
* _deadmanExplosives = [player, "DeadManSwitch"] call ACE_Explosives_fnc_getPlacedExplosives;
|
||||||
|
*
|
||||||
Example:
|
* Public: Yes
|
||||||
_allExplosives = [player] call ACE_Explosives_fnc_getPlacedExplosives;
|
*/
|
||||||
_deadmanExplosives = [player, "DeadManSwitch"] call ACE_Explosives_fnc_getPlacedExplosives;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit", "_clackerList", "_adjustedList", "_list", "_filter"];
|
private ["_unit", "_clackerList", "_adjustedList", "_list", "_filter"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_HandleScrollWheel
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Handles rotating of Explosives
|
||||||
Author(s):
|
*
|
||||||
L-H
|
* Arguments:
|
||||||
|
* Amount scrolled <NUMBER>
|
||||||
Description:
|
*
|
||||||
Handles rotating of Explosives
|
* Return Value:
|
||||||
|
* Handled <BOOL>
|
||||||
Parameters:
|
*
|
||||||
Number: Scroll amount
|
* Example:
|
||||||
|
* 1.2 call ACE_Explosives_fnc_HandleScrollWheel;
|
||||||
Returns:
|
*
|
||||||
Boolean: Handled or not.
|
* Public: No
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
1.2 call ACE_Explosives_fnc_HandleScrollWheel;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_obj"];
|
private ["_obj"];
|
||||||
if (isNull(GVAR(Setup)) || {ACE_Modifier == 0} || !GVAR(pfeh_running)) exitWith {false};
|
if (isNull(GVAR(Setup)) || {ACE_Modifier == 0} || !GVAR(pfeh_running)) exitWith {false};
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_hasExplosives
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Whether the passed unit has any explosives on them.
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Whether the passed unit has any explosives on them.
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* The unit has explosives <BOOL>
|
||||||
0: OBJECT - unit
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* _hasExplosives = [player] call ACE_Explosives_fnc_hasExplosives;
|
||||||
BOOLEAN - True if the unit has explosives.
|
*
|
||||||
|
* Public: Yes
|
||||||
Example:
|
*/
|
||||||
_hasExplosives = [player] call ACE_Explosives_fnc_hasExplosives;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit", "_result", "_magazines"];
|
private ["_unit", "_result", "_magazines"];
|
||||||
_result = false;
|
_result = false;
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_hasPlacedExplosives
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Whether the passed unit has placed any explosives or has a clacker that was used when explosives were placed.
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Whether the passed unit has placed any explosives or has a clacker that was used when explosives were placed.
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* Configs of all detonators <ARRAY>
|
||||||
0: OBJECT - unit
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* _hasPlacedExplosives = [player] call ACE_Explosives_fnc_hasPlacedExplosives;
|
||||||
BOOLEAN - True if the unit has explosives.
|
*
|
||||||
|
* Public: Yes
|
||||||
Example:
|
*/
|
||||||
_hasPLacedExplosives = [player] call ACE_Explosives_fnc_hasPlacedExplosives;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
(count (_this call FUNC(getPlacedExplosives)) > 0)
|
(count (_this call FUNC(getPlacedExplosives)) > 0)
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_module
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Initialises the explosives module
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* Module things.
|
||||||
Initialises the explosives module
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* None
|
||||||
Things
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* Called By BIS.
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
Example:
|
*/
|
||||||
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
if !(isServer) exitWith {};
|
if !(isServer) exitWith {};
|
||||||
_logic = _this select 0;
|
_logic = _this select 0;
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_openDetonateUI
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Opens the UI for explosive detonation selection
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Opens the UI for explosive detonation selection
|
* 1: Trigger classname <STRING>
|
||||||
|
*
|
||||||
Parameters:
|
* Return Value:
|
||||||
0: OBJECT - unit
|
* None
|
||||||
0: STRING - Classname of detonator
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* [player, "ACE_M26_Clacker"] call ACE_Explosives_fnc_openDetonateUI;
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
Example:
|
*/
|
||||||
[player, "ACE_M26_Clacker"] call ACE_Explosives_fnc_openDetonateUI;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit","_result", "_item"];
|
private ["_unit","_result", "_item"];
|
||||||
call EFUNC(interaction,hideMenu);
|
call EFUNC(interaction,hideMenu);
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_openPlaceUI
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Opens the UI for explosive placement selection
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Opens the UI for explosive placement selection
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* None
|
||||||
0: OBJECT - unit
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* [player] call ACE_Explosives_fnc_openPlaceUI;
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
Example:
|
*/
|
||||||
[player] call ACE_Explosives_fnc_openPlaceUI;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit","_mags", "_item", "_index", "_actions"];
|
private ["_unit","_mags", "_item", "_index", "_actions"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_openTimerSetUI
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Opens the UI for timer setting of an explosive
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Magazine <STRING>
|
||||||
Opens the UI for timer setting of an explosive
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* None
|
||||||
0: String - Magazine
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* ["SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_openTimerSetUI;
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
Example:
|
*/
|
||||||
[player] call ACE_Explosives_fnc_openTimerSetUI;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_mag"];
|
private ["_mag"];
|
||||||
_mag = _this select 0;
|
_mag = _this select 0;
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_openTransmitterUI
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Opens the UI for selecting the transmitter
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Opens the UI for selecting the transmitter
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* Nothing
|
||||||
0: OBJECT - Unit
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* [player] call ACE_Explosives_fnc_openTransmitterUI;
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
Example:
|
*/
|
||||||
[player] call ACE_Explosives_fnc_openTransmitterUI;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_items", "_unit", "_count", "_actions", "_config"];
|
private ["_items", "_unit", "_count", "_actions", "_config"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_openTriggerSelectionUI
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Opens the UI for explosive trigger selection
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Explosive Magazine <STRING>
|
||||||
Opens the UI for explosive trigger selection
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* None
|
||||||
0: String - explosive magazine
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* [lbData [8866, lbCurSel 8866]] call ACE_Explosives_fnc_openTriggerSelectionUI;
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
Example:
|
*/
|
||||||
[lbData [8866, lbCurSel 8866]] call ACE_Explosives_fnc_openTriggerSelectionUI;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_magazine", "_hasRequiredItems","_triggerTypes", "_actions", "_detonators", "_required", "_magTriggers"];
|
private ["_magazine", "_hasRequiredItems","_triggerTypes", "_actions", "_detonators", "_required", "_magTriggers"];
|
||||||
_magazine = _this select 0;
|
_magazine = _this select 0;
|
||||||
|
@ -1,26 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_PlaceExplosive
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Places an explosive at the requested position
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
Description:
|
* 1: Position to place explosive <POSITION>
|
||||||
Places an explosive at the requested position
|
* 2: Rotation <NUMBER>
|
||||||
|
* 3: Magazine class <STRING>
|
||||||
Parameters:
|
* 4: Config of trigger <CONFIG>
|
||||||
0: OBJECT - unit
|
* 5: Variables required for the trigger type <ARRAY>
|
||||||
1: POSITION - Position to place explosive
|
* 6: Should direction be set <BOOL>
|
||||||
2: NUMBER - Rotation
|
*
|
||||||
3: STRING - Magazine class
|
* Return Value:
|
||||||
4: Config - Config of trigger
|
* Placed explosive <OBJECT>
|
||||||
5: ARRAY - variables required for the trigger type
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* _explosive = [player, player modelToWorld [0,0.5, 0.1], 134,
|
||||||
OBJECT: Placed explosive
|
* "SatchelCharge_Remote_Mag", "Command", []] call ACE_Explosives_fnc_placeExplosive;
|
||||||
|
*
|
||||||
Example:
|
* Public: Yes
|
||||||
_explosive = [player, player modelToWorld [0,0.5, 0.1], 134, "SatchelCharge_Remote_Mag", "Command", []] call ACE_Explosives_fnc_PlaceExplosive;
|
*/
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_pos", "_dir", "_magazineClass", "_ammo", "_triggerSpecificVars", "_unit", "_triggerConfig", "_explosive"];
|
private ["_pos", "_dir", "_magazineClass", "_ammo", "_triggerSpecificVars", "_unit", "_triggerConfig", "_explosive"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_Place_Approve
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Approves placement of the explosive, releases the placement object for it
|
||||||
Author(s):
|
* to settle in a location suitable for the explosive to be created.
|
||||||
Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* None
|
||||||
Approves placement of the explosive, releases the placement object for it to settle in a location suitable for the explosive to be created.
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* None
|
||||||
Nothing
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* call ACE_Explosives_fnc_place_Approve;
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
Example:
|
*/
|
||||||
call ACE_Explosives_fnc_Place_Approve;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
if (GVAR(pfeh_running)) then {
|
if (GVAR(pfeh_running)) then {
|
||||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_Place_Cancel
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Cancels placement of the explosive
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* None
|
||||||
Description:
|
*
|
||||||
Cancels placement of the explosive
|
* Return Value:
|
||||||
|
* None
|
||||||
Parameters:
|
*
|
||||||
Nothing
|
* Example:
|
||||||
|
* call ACE_Explosives_fnc_place_Cancel;
|
||||||
Returns:
|
*
|
||||||
Nothing
|
* Public: Yes
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
call ACE_Explosives_fnc_Place_Cancel;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
if (GVAR(pfeh_running)) then {
|
if (GVAR(pfeh_running)) then {
|
||||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_selectTrigger
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Selects a trigger for an explosive.
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Magazine <STRING>
|
||||||
Selects a trigger for an explosive.
|
* 1: Trigger mode <STRING>
|
||||||
|
*
|
||||||
Parameters:
|
* Return Value:
|
||||||
0: String - Magazine
|
* None
|
||||||
1: String - trigger index in ACE_triggers of magazine class
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* ["SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger;
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
Example:
|
*/
|
||||||
["SatchelCharge_Remote_Mag","Timer"] call ACE_Explosives_fnc_selectTrigger;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_magazine","_trigger"];
|
private ["_magazine","_trigger"];
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
|
@ -1,26 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_SetPos
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Sets the Dir and pitch of passed object
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* 0: Explosive <OBJECT>
|
||||||
Description:
|
* 1: Direction <NUMBER>
|
||||||
Sets the Dir and pitch
|
* 2: Pitch <NUMBER>
|
||||||
|
*
|
||||||
Parameters:
|
* Return Value:
|
||||||
0: OBJECT - Object
|
* None
|
||||||
1: NUMBER - Direction
|
*
|
||||||
2: NUMBER - Pitch
|
* Example:
|
||||||
|
* [_explosive, 150, 90] call ACE_Explosives_fnc_SetPos;
|
||||||
Returns:
|
*
|
||||||
Nothing
|
* Public: Yes
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
[_explosive, 150, 90] call ACE_Explosives_fnc_SetPos;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private "_ex";
|
private "_ex";
|
||||||
_ex=_this select 0;
|
_ex = _this select 0;
|
||||||
_ex setDir (_this select 1);
|
_ex setDir (_this select 1);
|
||||||
if ((_this select 2) != 0) then {
|
if ((_this select 2) != 0) then {
|
||||||
[_ex, _this select 2, 0] call CALLSTACK(BIS_fnc_setPitchBank);
|
[_ex, _this select 2, 0] call CALLSTACK(BIS_fnc_setPitchBank);
|
||||||
|
@ -1,24 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_SetupExplosive
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Starts the setup process for the passed explosive. Player only.
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
Description:
|
* 1: Classname of explosive to place. (CfgMagazine class) <STRING>
|
||||||
Starts the setup process for the passed explosive.
|
* 2: Trigger Config <CONFIG>
|
||||||
|
* 3: Timer (optional) <NUMBER>
|
||||||
Parameters:
|
*
|
||||||
0: OBJECT - Unit placing explosive.
|
* Return Value:
|
||||||
1: STRING - Classname of explosive to place. (CfgMagazine class)
|
* None
|
||||||
2: Config - Trigger Config
|
*
|
||||||
3: NUMBER - (optional) timer
|
* Example:
|
||||||
|
* [player, "SatchelCharge_Remote_Mag", "Command"] call ACE_Explosives_fnc_SetupExplosive;
|
||||||
Returns:
|
*
|
||||||
Nothing
|
* Public: Yes
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
[player, "SatchelCharge_Remote_Mag", "Command"] call ACE_Explosives_fnc_SetupExplosive;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit", "_class", "_config", "_timer"];
|
private ["_unit", "_class", "_config", "_timer"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_StartDefuse
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Starts defusing an explosive
|
||||||
Author: Garth de Wet (LH)
|
*
|
||||||
|
* Arguments:
|
||||||
Description:
|
* 0: Unit <OBJECT>
|
||||||
Starts defusing an explosive
|
* 1: Target explosive <OBJECT>
|
||||||
|
*
|
||||||
Parameters:
|
* Return Value:
|
||||||
0: OBJECT - Unit to defuse explosive
|
* Nothing
|
||||||
1: OBJECT - Target explosive
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* [player, ACE_Interaction_Target] call ACE_Explosives_fnc_StartDefuse;
|
||||||
Nothing
|
*
|
||||||
|
* Public: Yes
|
||||||
Example:
|
*/
|
||||||
[player, ACE_Interaction_Target] call ACE_Explosives_fnc_StartDefuse;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit","_target"];
|
private ["_unit","_target"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
Author(s):
|
* Author: Garth 'L-H' de Wet
|
||||||
Garth de Wet (LH)
|
* Starts a timer for an explosive.
|
||||||
|
*
|
||||||
Description:
|
* Arguments:
|
||||||
Starts a timer for an explosive.
|
* 0: Explosive <OBJECT>
|
||||||
|
* 1: Time till detonate <NUMBER>
|
||||||
Parameters:
|
*
|
||||||
0: OBJECT - Explosive
|
* Return Value:
|
||||||
1: NUMBER - time till detonation
|
* None
|
||||||
|
*
|
||||||
Returns:
|
* Example:
|
||||||
Nothing
|
* [_explosive, 10] call ACE_Explosives_fnc_startTimer;
|
||||||
|
*
|
||||||
Example:
|
* Public: Yes
|
||||||
[_explosive, 10] call ACE_Explosives_fnc_startTimer;
|
*/
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
EXPLODE_2_PVT(_this,_explosive,_delay);
|
EXPLODE_2_PVT(_this,_explosive,_delay);
|
||||||
@ -24,4 +23,4 @@ EXPLODE_2_PVT(_this,_explosive,_delay);
|
|||||||
if (!isNull _explosive) then {
|
if (!isNull _explosive) then {
|
||||||
[_explosive, -1, [_explosive, 0], true] call FUNC(detonateExplosive);
|
[_explosive, -1, [_explosive, 0], true] call FUNC(detonateExplosive);
|
||||||
};
|
};
|
||||||
}, _explosive, _delay, 0] call EFUNC(common,waitAndExecute);
|
}, _explosive, _delay, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Explosives_fnc_TriggerType
|
* Author: Garth 'L-H' de Wet
|
||||||
|
* Gets the types of triggers associated with the explosive
|
||||||
Author(s):
|
*
|
||||||
Garth de Wet (LH)
|
* Arguments:
|
||||||
|
* 0: Explosive magazine <STRING>
|
||||||
Description:
|
*
|
||||||
Gets the types of triggers associated with the explosive
|
* Return Value:
|
||||||
|
* Supported triggers as CfgACE_Triggers config entries <ARRAY>
|
||||||
Parameters:
|
*
|
||||||
0: String - Explosive magazine
|
* Example:
|
||||||
|
* _supports = ["SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_TriggerType
|
||||||
Returns:
|
*
|
||||||
ARRAY
|
* Public: Yes
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
_supports = ["SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_TriggerType;
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private "_result";
|
private "_result";
|
||||||
_result = [];
|
_result = [];
|
||||||
|
Reference in New Issue
Block a user