mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Illumination Flares (#4506)
* Illumination Flares * add M992 IR flare * update debug script * comments
This commit is contained in:
parent
1511ecc1c0
commit
f81f5830c5
@ -5,7 +5,7 @@ class CfgAmmo {
|
||||
GVAR(pullPinSound)[] = {"A3\sounds_f\weapons\grenades\Grenade_PullPin.wss", 1.5, 1, 10};
|
||||
impactGroundSoft[] = {};
|
||||
};
|
||||
|
||||
|
||||
class FlareCore;
|
||||
class FlareBase: FlareCore {
|
||||
intensity = 20000;
|
||||
@ -17,6 +17,21 @@ class CfgAmmo {
|
||||
intensity = 40000;
|
||||
flareSize = 12;
|
||||
};
|
||||
class ACE_40mm_Flare_white: F_40mm_White {
|
||||
intensity = 1250000; // vanilla: 10000
|
||||
timeToLive = 45; // vanilla: 25, ace changes to 60 in FlareBase
|
||||
coefGravity = 0.25; // vanilla: undefined (would be 1)
|
||||
// Makes the ammo fall the ground slower (~2 m/s)
|
||||
};
|
||||
class ACE_40mm_Flare_red: ACE_40mm_Flare_white {
|
||||
lightColor[] = {0.5,0.25,0.25,0};
|
||||
};
|
||||
class ACE_40mm_Flare_green: ACE_40mm_Flare_white {
|
||||
lightColor[] = {0.25,0.5,0.25,0};
|
||||
};
|
||||
class ACE_40mm_Flare_ir: ACE_40mm_Flare_white {
|
||||
nvgOnly = 1;
|
||||
};
|
||||
|
||||
class F_20mm_White: FlareBase {
|
||||
intensity = 20000;
|
||||
|
5
addons/grenades/CfgMagazineWells.hpp
Normal file
5
addons/grenades/CfgMagazineWells.hpp
Normal file
@ -0,0 +1,5 @@
|
||||
class CfgMagazineWells {
|
||||
class CBA_40mm_M203 {
|
||||
ADDON[] = {"ACE_40mm_flare_white", "ACE_40mm_flare_red", "ACE_40mm_flare_green", "ACE_40mm_flare_ir"};
|
||||
};
|
||||
};
|
@ -89,4 +89,35 @@ class CfgMagazines {
|
||||
ammo = "F_40mm_Red";
|
||||
initSpeed = 120;
|
||||
};
|
||||
|
||||
class UGL_FlareWhite_F;
|
||||
class ACE_40mm_Flare_white: UGL_FlareWhite_F {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_40mm_Flare_white";
|
||||
displayName = CSTRING(40mm_flare_white);
|
||||
descriptionShort = CSTRING(parachute_flare_description);
|
||||
};
|
||||
|
||||
class UGL_FlareRed_F;
|
||||
class ACE_40mm_Flare_red: UGL_FlareRed_F {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_40mm_Flare_red";
|
||||
displayName = CSTRING(40mm_flare_red);
|
||||
descriptionShort = CSTRING(parachute_flare_description);
|
||||
};
|
||||
|
||||
class UGL_FlareGreen_F;
|
||||
class ACE_40mm_Flare_green: UGL_FlareGreen_F {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_40mm_Flare_green";
|
||||
displayName = CSTRING(40mm_flare_green);
|
||||
descriptionShort = CSTRING(parachute_flare_description);
|
||||
};
|
||||
|
||||
class ACE_40mm_Flare_ir: UGL_FlareWhite_F {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_40mm_Flare_ir";
|
||||
displayName = CSTRING(40mm_flare_ir);
|
||||
descriptionShort = CSTRING(parachute_flare_ir_description);
|
||||
};
|
||||
};
|
||||
|
@ -25,6 +25,7 @@ class CfgPatches {
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgMagazineWells.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
#include "Effects.hpp"
|
||||
|
39
addons/grenades/dev/dev_testFlares.sqf
Normal file
39
addons/grenades/dev/dev_testFlares.sqf
Normal file
@ -0,0 +1,39 @@
|
||||
// execVM "z\ace\addons\grenades\dev\dev_testFlares.sqf";
|
||||
|
||||
removeAllWeapons player;
|
||||
|
||||
player addMagazine "UGL_FlareWhite_F";
|
||||
player addMagazine "UGL_FlareWhite_F";
|
||||
player addMagazine "ACE_40mm_Flare_white";
|
||||
player addMagazine "ACE_40mm_Flare_white";
|
||||
player addMagazine "ACE_40mm_Flare_green";
|
||||
player addMagazine "ACE_40mm_Flare_red";
|
||||
player addMagazine "ACE_40mm_Flare_ir";
|
||||
player linkItem "NVGoggles";
|
||||
skipTime 12;
|
||||
|
||||
player addWeapon "arifle_MX_GL_ACO_F";
|
||||
|
||||
["ace_firedPlayer", {
|
||||
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"];
|
||||
systemChat str _magazine;
|
||||
[{
|
||||
params ["_args", "_pfid"];
|
||||
_args params ["_projectile", "_launchHeight", "_shotTime", "_deployedTime"];
|
||||
if (!alive _projectile) exitWith {[_pfid] call CBA_fnc_removePerFrameHandler;};
|
||||
|
||||
private _out = format ["Flight time: %1\n", (time - _shotTime) toFixed 1];
|
||||
if (_deployedTime < 0) then {
|
||||
if ((vectorMagnitude velocity _projectile) < 10) then {
|
||||
_args set [3, time];
|
||||
};
|
||||
} else {
|
||||
_out = _out + format ["Deployed time: %1\n", (time - _deployedTime) toFixed 1];
|
||||
};
|
||||
_out = _out + format ["Height Above Launch: %1\n", (((getPosASL _projectile) select 2) - _launchHeight) toFixed 1];
|
||||
_out = _out + format ["Height Above Terrain: %1\n", ((getPosATL _projectile) select 2) toFixed 1];
|
||||
_out = _out + format ["Speed: %1\nVelocity:\n%2\n", (vectorMagnitude velocity _projectile) toFixed 1, (velocity _projectile) apply {_x toFixed 1}];
|
||||
|
||||
hintSilent _out;
|
||||
}, 0.1, [_projectile, (getPosASL _unit) select 2, time, -1]] call CBA_fnc_addPerFrameHandler;
|
||||
}] call CBA_fnc_addEventHandler;
|
@ -373,5 +373,23 @@
|
||||
<Chinesesimp>燃烧手榴弹是用来摧毁武器,弹药以及其他装备的好帮手。</Chinesesimp>
|
||||
<Chinese>燃燒手榴彈是用來摧毀武器,彈藥以及其他裝備的好幫手</Chinese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Grenades_parachute_flare_description">
|
||||
<English>Type: Star Parachute Flare</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Grenades_40mm_flare_white">
|
||||
<English>M583 Illumination Flare (White)</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Grenades_40mm_flare_red">
|
||||
<English>M662 Illumination Flare (Red)</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Grenades_40mm_flare_green">
|
||||
<English>M661 Illumination Flare (Green)</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Grenades_parachute_flare_ir_description">
|
||||
<English>Type: Parachute IR Flare</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Grenades_40mm_flare_ir">
|
||||
<English>M992 Illumination IR Flare</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user