mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add Tripflare (#4152)
This commit is contained in:
parent
8fc2cbd0ef
commit
f354bab3c2
@ -41,6 +41,29 @@ class CfgAmmo {
|
||||
GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12};
|
||||
};
|
||||
|
||||
class ACE_FlareTripMine_Wire_Ammo: APERSTripMine_Wire_Ammo {
|
||||
SoundSetExplosion[] = {};
|
||||
defaultMagazine = "ACE_FlareTripMine_Mag"; //Mag that gets dropped after defuse
|
||||
hit = 0;
|
||||
indirectHit = 0;
|
||||
indirectHitRange = 0;
|
||||
soundHit[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
|
||||
explosionEffects = "ACE_TripflareEffect";
|
||||
CraterEffects = "";
|
||||
soundTrigger[] = {"",1,1};
|
||||
class CamShakeExplode {
|
||||
power = 0;
|
||||
duration = 0;
|
||||
frequency = 0;
|
||||
distance = 0;
|
||||
};
|
||||
};
|
||||
|
||||
class F_20mm_Red;
|
||||
class ACE_TripFlare_FlareEffect: F_20mm_Red {
|
||||
triggerTime = 0.1;
|
||||
};
|
||||
|
||||
class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase {
|
||||
indirectHitRange = 20;
|
||||
GVAR(explodeOnDefuseChance) = 1;
|
||||
|
15
addons/explosives/CfgCloudlets.hpp
Normal file
15
addons/explosives/CfgCloudlets.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
class CfgCloudlets {
|
||||
class Default;
|
||||
class ACE_TripFlare: Default {
|
||||
lifeTime = 0;
|
||||
beforeDestroyScript = "\z\ace\addons\explosives\scripts\TripflareEffect.sqf";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_TripflareEffect {
|
||||
class SpawnFlare {
|
||||
simulation = "particles";
|
||||
type = "ACE_TripFlare";
|
||||
position = "explosionPos";
|
||||
};
|
||||
};
|
@ -37,6 +37,14 @@ class CfgMagazines {
|
||||
class Tripwire;
|
||||
};
|
||||
};
|
||||
class ACE_FlareTripMine_Mag: APERSTripMine_Wire_Mag {
|
||||
author = ECSTRING(common,aceteam);
|
||||
ammo = "ACE_FlareTripMine_Wire_Ammo";
|
||||
GVAR(SetupObject) = "ACE_Explosives_Place_APERSTripwireMine";
|
||||
displayName = CSTRING(TripFlare_Name);
|
||||
descriptionShort = CSTRING(TripFlare_Description);
|
||||
class Library {libTextDesc = CSTRING(TripFlare_Description);};
|
||||
};
|
||||
|
||||
class ClaymoreDirectionalMine_Remote_Mag: CA_Magazine {
|
||||
GVAR(Placeable) = 1;
|
||||
|
@ -346,6 +346,13 @@ class CfgVehicles {
|
||||
// TODO: Find a way to place the mine laying down instead of standing up
|
||||
};
|
||||
|
||||
class APERSTripMine: MineBase {};
|
||||
class ACE_FlareTripMine: APERSTripMine {
|
||||
author = ECSTRING(common,aceteam);
|
||||
ammo = "ACE_FlareTripMine_Wire_Ammo";
|
||||
displayName = CSTRING(TripFlare_Name);
|
||||
};
|
||||
|
||||
class IEDUrbanBig_F;
|
||||
class ACE_IEDUrbanBig_Range: IEDUrbanBig_F {
|
||||
author = ECSTRING(common,aceteam);
|
||||
|
@ -42,6 +42,7 @@ PREP(selectTrigger);
|
||||
PREP(setupExplosive);
|
||||
PREP(setPosition);
|
||||
PREP(setSpeedDial);
|
||||
PREP(spawnFlare);
|
||||
PREP(startDefuse);
|
||||
PREP(startTimer);
|
||||
PREP(triggerType);
|
||||
|
@ -22,6 +22,7 @@ class CfgPatches {
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgCloudlets.hpp"
|
||||
|
||||
#include "ACE_Triggers.hpp"
|
||||
#include "ExplosivesUI.hpp"
|
||||
|
23
addons/explosives/functions/fnc_spawnFlare.sqf
Normal file
23
addons/explosives/functions/fnc_spawnFlare.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: VKing
|
||||
* Spawns a flare on the ground for tripflare trigger
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Position <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [getPos groundFlare] call ace_explosives_fnc_spawnFlare
|
||||
*
|
||||
* Public: no
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_posX","_posY","_posZ"];
|
||||
TRACE_3("Params",_posX,_posY,_posZ);
|
||||
|
||||
private _flare = "ACE_TripFlare_FlareEffect" createVehicle [_posX,_posY,_posZ];
|
||||
|
||||
TRACE_1("",_flare);
|
20
addons/explosives/scripts/TripflareEffect.sqf
Normal file
20
addons/explosives/scripts/TripflareEffect.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: VKing
|
||||
* Spawns a flare on the ground for tripflare trigger
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Position <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* beforeDestroyScript = "\z\ace\addons\explosives\scripts\TripflareEffect.sqf;
|
||||
*
|
||||
* Public: no
|
||||
*/
|
||||
|
||||
// This is called from a CfgCloudlet's beforeDestroyScript config.
|
||||
// It will be re-compiled each use, so avoid complex preProcessor includes and just call the prepared function.
|
||||
|
||||
_this call ace_explosives_fnc_spawnFlare;
|
@ -755,5 +755,11 @@
|
||||
<Italian>Collega a %1</Italian>
|
||||
<Portuguese>Conectar à %1</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_TripFlare_Name">
|
||||
<English>Tripwire Flare</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_TripFlare_Description">
|
||||
<English>Type: Tripwire flare - Ignites a non-lethal flare when triggered.<br />Rounds: 1<br />Used on: Ground</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user