Add Tripflare (#4152)

This commit is contained in:
PabstMirror 2016-08-13 04:29:01 -05:00 committed by Glowbal
parent 8fc2cbd0ef
commit f354bab3c2
9 changed files with 104 additions and 0 deletions

View File

@ -41,6 +41,29 @@ class CfgAmmo {
GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12}; 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 { class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase {
indirectHitRange = 20; indirectHitRange = 20;
GVAR(explodeOnDefuseChance) = 1; GVAR(explodeOnDefuseChance) = 1;

View 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";
};
};

View File

@ -37,6 +37,14 @@ class CfgMagazines {
class Tripwire; 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 { class ClaymoreDirectionalMine_Remote_Mag: CA_Magazine {
GVAR(Placeable) = 1; GVAR(Placeable) = 1;

View File

@ -346,6 +346,13 @@ class CfgVehicles {
// TODO: Find a way to place the mine laying down instead of standing up // 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 IEDUrbanBig_F;
class ACE_IEDUrbanBig_Range: IEDUrbanBig_F { class ACE_IEDUrbanBig_Range: IEDUrbanBig_F {
author = ECSTRING(common,aceteam); author = ECSTRING(common,aceteam);

View File

@ -42,6 +42,7 @@ PREP(selectTrigger);
PREP(setupExplosive); PREP(setupExplosive);
PREP(setPosition); PREP(setPosition);
PREP(setSpeedDial); PREP(setSpeedDial);
PREP(spawnFlare);
PREP(startDefuse); PREP(startDefuse);
PREP(startTimer); PREP(startTimer);
PREP(triggerType); PREP(triggerType);

View File

@ -22,6 +22,7 @@ class CfgPatches {
#include "CfgMagazines.hpp" #include "CfgMagazines.hpp"
#include "CfgWeapons.hpp" #include "CfgWeapons.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"
#include "CfgCloudlets.hpp"
#include "ACE_Triggers.hpp" #include "ACE_Triggers.hpp"
#include "ExplosivesUI.hpp" #include "ExplosivesUI.hpp"

View 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);

View 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;

View File

@ -755,5 +755,11 @@
<Italian>Collega a %1</Italian> <Italian>Collega a %1</Italian>
<Portuguese>Conectar à %1</Portuguese> <Portuguese>Conectar à %1</Portuguese>
</Key> </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.&lt;br /&gt;Rounds: 1&lt;br /&gt;Used on: Ground</English>
</Key>
</Package> </Package>
</Project> </Project>