First Pass

This commit is contained in:
PabstMirror 2015-01-14 03:06:47 -06:00
parent 7ead73bc1f
commit 77065afb02
21 changed files with 349 additions and 333 deletions

View File

@ -0,0 +1,89 @@
class CfgAmmo {
class FlareCore;
class FlareBase: FlareCore {
intensity = 20000;
flareSize = 12;
};
class F_40mm_White: FlareBase {
intensity = 40000;
flareSize = 12;
};
class F_20mm_White: FlareBase {
intensity = 20000;
flareSize = 12;
};
class F_Signal_Green: FlareBase {
intensity = 20000;
flareSize = 12;
};
class Flare_82mm_AMOS_White: FlareCore {
intensity = 80000;
flareSize = 12;
};
class F_20mm_Red: F_20mm_White {};
class F_20mm_Green: F_20mm_White {};
class F_20mm_Yellow: F_20mm_White {};
class ACE_F_Hand_White: F_20mm_White {
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
class ACE_F_Hand_Red: F_20mm_Red {
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
class ACE_F_Hand_Green: F_20mm_Green {
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
class ACE_F_Hand_Yellow: F_20mm_Yellow {
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
class ACE_G_M84: F_20mm_Yellow {
useFlare = 0;
flareSize = 0;
intensity = 0;
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
fuseDistance = 2.3; //todo should this be explosionTime
model = PATHTOF(\models\ACE_m84_thrown.p3d);
};
};

View File

@ -0,0 +1,19 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
clientFiredBIS = QUOTE( _this call FUNC(throwGrenade) );
};
};
};

View File

@ -0,0 +1,60 @@
class CfgMagazines {
class HandGrenade;
class ACE_HandFlare_Base: HandGrenade {
value = 2;
nameSoundWeapon = "smokeshell";
nameSound = "smokeshell";
mass = 4;
initSpeed = 22;
};
class ACE_HandFlare_White: ACE_HandFlare_Base {
ammo = "ACE_F_Hand_White";
displayname = "$STR_ACE_Grenades_M127A1_White_Name";
descriptionshort = "$STR_ACE_Grenades_M127A1_White_Description";
displayNameShort = "$STR_ACE_Grenades_M127A1_White_NameShort";
model = "\A3\weapons_f\ammo\flare_white";
picture = "\A3\Weapons_F\Data\UI\gear_flare_white_ca.paa";
};
class ACE_HandFlare_Red: ACE_HandFlare_Base {
ammo = "ACE_F_Hand_Red";
displayname = "$STR_ACE_Grenades_M127A1_Red_Name";
descriptionshort = "$STR_ACE_Grenades_M127A1_Red_Description";
displayNameShort = "$STR_ACE_Grenades_M127A1_Red_NameShort";
model = "\A3\weapons_f\ammo\flare_red";
picture = "\A3\Weapons_F\Data\UI\gear_flare_red_ca.paa";
};
class ACE_HandFlare_Green: ACE_HandFlare_Base {
ammo = "ACE_F_Hand_Green";
displayname = "$STR_ACE_Grenades_M127A1_Green_Name";
descriptionshort = "$STR_ACE_Grenades_M127A1_Green_Description";
displayNameShort = "$STR_ACE_Grenades_M127A1_Green_NameShort";
model = "\A3\weapons_f\ammo\flare_green";
picture = "\A3\Weapons_F\Data\UI\gear_flare_green_ca.paa";
};
class ACE_HandFlare_Yellow: ACE_HandFlare_Base {
ammo = "ACE_F_Hand_Yellow";
displayname = "$STR_ACE_Grenades_M127A1_Yellow_Name";
descriptionshort = "$STR_ACE_Grenades_M127A1_Yellow_Description";
displayNameShort = "$STR_ACE_Grenades_M127A1_Yellow_NameShort";
model = "\A3\weapons_f\ammo\flare_yellow";
picture = "\A3\Weapons_F\Data\UI\gear_flare_yellow_ca.paa";
};
class ACE_M84: HandGrenade {
ammo = "ACE_G_M84";
displayname = "$STR_ACE_Grenades_M84_Name";
descriptionshort = "$STR_ACE_Grenades_M84_Description";
displayNameShort = "M84";
model = PATHTOF(\models\ACE_m84.p3d);
picture = PATHTOF(\UI\ACE_m84_x_ca.paa);
};
class 3Rnd_UGL_FlareGreen_F;
class 6Rnd_GreenSignal_F: 3Rnd_UGL_FlareGreen_F {
ammo = "F_40mm_Green";
initSpeed = 120;
};
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
ammo = "F_40mm_Red";
initSpeed = 120;
};
};

View File

@ -0,0 +1,45 @@
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
class CfgVehicles {
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class Box_NATO_Support_F;
class Box_NATO_Grenades_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_White,12)
MACRO_ADDITEM(ACE_HandFlare_Green,12)
MACRO_ADDITEM(ACE_M84,12)
};
};
class Box_East_Grenades_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
MACRO_ADDITEM(ACE_HandFlare_Red,12)
MACRO_ADDITEM(ACE_M84,12)
};
};
class Box_IND_Grenades_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
MACRO_ADDITEM(ACE_HandFlare_Green,12)
MACRO_ADDITEM(ACE_M84,12)
};
};
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_White,12)
MACRO_ADDITEM(ACE_HandFlare_Red,12)
MACRO_ADDITEM(ACE_HandFlare_Green,12)
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
MACRO_ADDITEM(ACE_M84,12)
};
};
};

View File

@ -0,0 +1,23 @@
class CfgWeapons {
class GrenadeLauncher;
class Throw: GrenadeLauncher {
muzzles[] += {"ACE_HandFlare_WhiteMuzzle", "ACE_HandFlare_RedMuzzle", "ACE_HandFlare_GreenMuzzle", "ACE_HandFlare_YellowMuzzle", "ACE_M84Muzzle"};
class ThrowMuzzle;
class ACE_HandFlare_WhiteMuzzle: ThrowMuzzle {
magazines[] = {"ACE_HandFlare_White"};
};
class ACE_HandFlare_RedMuzzle: ThrowMuzzle {
magazines[] = {"ACE_HandFlare_Red"};
};
class ACE_HandFlare_GreenMuzzle: ThrowMuzzle {
magazines[] = {"ACE_HandFlare_Green"};
};
class ACE_HandFlare_YellowMuzzle: ThrowMuzzle {
magazines[] = {"ACE_HandFlare_Yellow"};
};
class ACE_M84Muzzle: ThrowMuzzle {
magazines[] = {"ACE_M84"};
};
};
};

View File

@ -0,0 +1,6 @@
// by commy2
#include "script_component.hpp"
GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
PREP(flashbangEffect);
PREP(nextMode);
PREP(throwGrenade);

View File

@ -1,4 +0,0 @@
// by commy2
AGM_Flashbang_CC = ppEffectCreate ["ColorCorrections", 4265];
AGM_Flashbang_CC ppEffectForceInNVG true;

View File

@ -1,47 +1,22 @@
#include "script_component.hpp"
class CfgPatches {
class AGM_Grenades {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = 0.60;
requiredAddons[] = {AGM_Core};
version = "0.95";
versionStr = "0.95";
versionAr[] = {0,95,0};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"commy2", "KoffeinFlummi"};
authorUrl = "https://github.com/commy2/";
VERSION_CONFIG;
};
};
class CfgFunctions {
class AGM_Grenades {
class AGM_Grenades {
file = "\AGM_Grenades\functions";
class flashbangEffect;
class nextMode;
class throwGrenade;
};
};
};
class Extended_PostInit_EventHandlers {
class AGM_Grenades {
clientInit = "call compile preprocessFileLineNumbers '\AGM_Grenades\clientInit.sqf'";
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class AGM_Grenades_ThrowGrenade {
clientFiredBIS = "if (_this select 0 == AGM_player) then {_this call AGM_Grenades_fnc_throwGrenade;};";
};
};
};
class AGM_Core_Default_Keys {
class ACE_Core_Default_Keys {
class switchGrenadeMode {
displayName = "$STR_AGM_Grenades_SwitchGrenadeMode";
condition = "[_player] call AGM_Core_fnc_canUseWeapon";
statement = "call AGM_Grenades_fnc_nextMode";
displayName = "$STR_ACE_Grenades_SwitchGrenadeMode";
condition = "[_player] call ACE_Core_fnc_canUseWeapon";
statement = "call ACE_Grenades_fnc_nextMode";
key = 9;//34;
shift = 0;
control = 0;
@ -49,224 +24,8 @@ class AGM_Core_Default_Keys {
};
};
class CfgAmmo {
class FlareCore;
class FlareBase: FlareCore {
intensity = 20000;
flareSize = 12;
};
class F_40mm_White: FlareBase {
intensity = 40000;
flareSize = 12;
};
class F_20mm_White: FlareBase {
intensity = 20000;
flareSize = 12;
};
class F_Signal_Green: FlareBase {
intensity = 20000;
flareSize = 12;
};
class Flare_82mm_AMOS_White: FlareCore {
intensity = 80000;
flareSize = 12;
};
class F_20mm_Red: F_20mm_White {};
class F_20mm_Green: F_20mm_White {};
class F_20mm_Yellow: F_20mm_White {};
class AGM_F_Hand_White: F_20mm_White {
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
class AGM_F_Hand_Red: F_20mm_Red {
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
class AGM_F_Hand_Green: F_20mm_Green {
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
class AGM_F_Hand_Yellow: F_20mm_Yellow {
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
};
class AGM_G_M84: F_20mm_Yellow {
useFlare = 0;
flareSize = 0;
intensity = 0;
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
timeToLive = 60;
fuseDistance = 2.3;
model = "agm_grenades\agm_m84_thrown.p3d";
};
};
class CfgMagazines {
class HandGrenade;
class AGM_HandFlare_Base: HandGrenade {
value = 2;
nameSoundWeapon = "smokeshell";
nameSound = "smokeshell";
mass = 4;
initSpeed = 22;
};
class AGM_HandFlare_White: AGM_HandFlare_Base {
ammo = "AGM_F_Hand_White";
displayname = "$STR_AGM_Grenades_M127A1_White_Name";
descriptionshort = "$STR_AGM_Grenades_M127A1_White_Description";
displayNameShort = "$STR_AGM_Grenades_M127A1_White_NameShort";
model = "\A3\weapons_f\ammo\flare_white";
picture = "\A3\Weapons_F\Data\UI\gear_flare_white_ca.paa";
};
class AGM_HandFlare_Red: AGM_HandFlare_Base {
ammo = "AGM_F_Hand_Red";
displayname = "$STR_AGM_Grenades_M127A1_Red_Name";
descriptionshort = "$STR_AGM_Grenades_M127A1_Red_Description";
displayNameShort = "$STR_AGM_Grenades_M127A1_Red_NameShort";
model = "\A3\weapons_f\ammo\flare_red";
picture = "\A3\Weapons_F\Data\UI\gear_flare_red_ca.paa";
};
class AGM_HandFlare_Green: AGM_HandFlare_Base {
ammo = "AGM_F_Hand_Green";
displayname = "$STR_AGM_Grenades_M127A1_Green_Name";
descriptionshort = "$STR_AGM_Grenades_M127A1_Green_Description";
displayNameShort = "$STR_AGM_Grenades_M127A1_Green_NameShort";
model = "\A3\weapons_f\ammo\flare_green";
picture = "\A3\Weapons_F\Data\UI\gear_flare_green_ca.paa";
};
class AGM_HandFlare_Yellow: AGM_HandFlare_Base {
ammo = "AGM_F_Hand_Yellow";
displayname = "$STR_AGM_Grenades_M127A1_Yellow_Name";
descriptionshort = "$STR_AGM_Grenades_M127A1_Yellow_Description";
displayNameShort = "$STR_AGM_Grenades_M127A1_Yellow_NameShort";
model = "\A3\weapons_f\ammo\flare_yellow";
picture = "\A3\Weapons_F\Data\UI\gear_flare_yellow_ca.paa";
};
class AGM_M84: HandGrenade {
ammo = "AGM_G_M84";
displayname = "$STR_AGM_Grenades_M84_Name";
descriptionshort = "$STR_AGM_Grenades_M84_Description";
displayNameShort = "M84";
model = "agm_grenades\agm_m84.p3d";
picture = "\agm_grenades\UI\agm_m84_x_ca.paa";
};
class 3Rnd_UGL_FlareGreen_F;
class 6Rnd_GreenSignal_F: 3Rnd_UGL_FlareGreen_F {
ammo = "F_40mm_Green";
initSpeed = 120;
};
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
ammo = "F_40mm_Red";
initSpeed = 120;
};
};
class CfgWeapons {
class GrenadeLauncher;
class Throw: GrenadeLauncher {
muzzles[] += {"AGM_HandFlare_WhiteMuzzle", "AGM_HandFlare_RedMuzzle", "AGM_HandFlare_GreenMuzzle", "AGM_HandFlare_YellowMuzzle", "AGM_M84Muzzle"};
class ThrowMuzzle;
class AGM_HandFlare_WhiteMuzzle: ThrowMuzzle {
magazines[] = {"AGM_HandFlare_White"};
};
class AGM_HandFlare_RedMuzzle: ThrowMuzzle {
magazines[] = {"AGM_HandFlare_Red"};
};
class AGM_HandFlare_GreenMuzzle: ThrowMuzzle {
magazines[] = {"AGM_HandFlare_Green"};
};
class AGM_HandFlare_YellowMuzzle: ThrowMuzzle {
magazines[] = {"AGM_HandFlare_Yellow"};
};
class AGM_M84Muzzle: ThrowMuzzle {
magazines[] = {"AGM_M84"};
};
};
};
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
class CfgVehicles {
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class Box_NATO_Support_F;
class Box_NATO_Grenades_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_HandFlare_White,12)
MACRO_ADDITEM(AGM_HandFlare_Green,12)
MACRO_ADDITEM(AGM_M84,12)
};
};
class Box_East_Grenades_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_HandFlare_Yellow,12)
MACRO_ADDITEM(AGM_HandFlare_Red,12)
MACRO_ADDITEM(AGM_M84,12)
};
};
class Box_IND_Grenades_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_HandFlare_Yellow,12)
MACRO_ADDITEM(AGM_HandFlare_Green,12)
MACRO_ADDITEM(AGM_M84,12)
};
};
class AGM_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(AGM_HandFlare_White,12)
MACRO_ADDITEM(AGM_HandFlare_Red,12)
MACRO_ADDITEM(AGM_HandFlare_Green,12)
MACRO_ADDITEM(AGM_HandFlare_Yellow,12)
MACRO_ADDITEM(AGM_M84,12)
};
};
};
#include "CfgEventHandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"

View File

@ -11,6 +11,8 @@
* None
*/
#include "script_component.hpp"
_this spawn {
_unit = _this select 0;
_grenade = _this select 1;
@ -45,8 +47,8 @@ _this spawn {
};
// beeeeeeeeeeeeeeeeeeeeeeeeeeeeep
if (isClass (configFile >> "CfgPatches" >> "AGM_Hearing") and _strength > 0) then {
[_unit, 0.5 + (_strength / 2)] call AGM_Hearing_fnc_earRinging;
if (isClass (configFile >> "CfgPatches" >> "ACE_Hearing") and _strength > 0) then {
[_unit, 0.5 + (_strength / 2)] call ACE_Hearing_fnc_earRinging;
};
// account for people looking away by slightly
@ -73,9 +75,9 @@ _this spawn {
// blind player
if (_strength > 0.1) then {
AGM_Flashbang_CC ppEffectEnable true;
AGM_Flashbang_CC ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
AGM_Flashbang_CC ppEffectCommit 0.01;
GVAR(flashbangPPEffectCC) ppEffectEnable true;
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
GVAR(flashbangPPEffectCC) ppEffectCommit 0.01;
};
sleep 0.1;
@ -83,11 +85,11 @@ _this spawn {
sleep (7 * _strength);
if (_strength > 0.1) then {
AGM_Flashbang_CC ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
AGM_Flashbang_CC ppEffectCommit (10 * _strength);
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength);
sleep (10 * _strength);
AGM_Flashbang_CC ppEffectEnable false;
GVAR(flashbangPPEffectCC) ppEffectEnable false;
};
};

View File

@ -10,9 +10,11 @@
* Nothing
*/
#include "script_component.hpp"
private ["_mode", "_hint"];
_mode = missionNamespace getVariable ["AGM_Grenades_Mode", 0];
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
if (_mode == 4) then {
_mode = 0;
@ -26,13 +28,13 @@ if (_mode == 3) then {
};
_hint = [
localize "STR_AGM_Grenades_NormalThrow",
localize "STR_AGM_Grenades_HighThrow",
localize "STR_AGM_Grenades_PreciseThrow",
localize "STR_AGM_Grenades_RollGrenade",
localize "STR_AGM_Grenades_DropGrenade"
localize "STR_ACE_Grenades_NormalThrow",
localize "STR_ACE_Grenades_HighThrow",
localize "STR_ACE_Grenades_PreciseThrow",
localize "STR_ACE_Grenades_RollGrenade",
localize "STR_ACE_Grenades_DropGrenade"
] select _mode;
[_hint] call AGM_Core_fnc_displayTextStructured;
[_hint] call EFUNC(common,displayTextStructured);
AGM_Grenades_Mode = _mode;
GVAR(currentThrowMode) = _mode;

View File

@ -1,26 +1,27 @@
/*
* Author: commy2
*
* Adjust the grenades throwing direction and speed to the selected throwing mode.
*
* Argument:
* input from "Fired" eventhandler
*
* Return value:
* Nothing
*/
* Author: commy2
*
* Adjust the grenades throwing direction and speed to the selected throwing mode.
*
* Argument:
* input from "Fired" eventhandler
*
* Return value:
* Nothing
*/
private ["_unit", "_weapon", "_projectile"];
#include "script_component.hpp"
private ["_unit", "_weapon", "_projectile", "_mode", "_fuzeTime"];
_unit = _this select 0;
_weapon = _this select 1;
_projectile = _this select 6;
if (_unit != ACE_player) exitWith {};
if (_weapon != "Throw") exitWith {};
private "_mode";
_mode = missionNamespace getVariable ["AGM_Grenades_Mode", 0];
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
if (_mode != 0) then {
private "_velocity";
@ -29,23 +30,23 @@ if (_mode != 0) then {
switch (_mode) do {
//high throw
case 1 : {
case 1 : {
_velocity = [
0.5 * (_velocity select 0),
0.5 * (_velocity select 1),
[0, 0, 0] distance (_velocity vectorMultiply 0.5)
0.5 * (_velocity select 0),
0.5 * (_velocity select 1),
[0, 0, 0] distance (_velocity vectorMultiply 0.5)
];
};
//precise throw
case 2 : {
case 2 : {
_velocity = (_unit weaponDirection _weapon) vectorMultiply (vectorMagnitude _velocity);
};
//roll grande
case 3 : {
case 3 : {
//@todo
};
//drop grenade
case 4 : {
case 4 : {
_velocity = [0, 0, 0];
};
};
@ -53,19 +54,8 @@ if (_mode != 0) then {
_projectile setVelocity _velocity;
};
if (typeOf _projectile == "AGM_G_M84") then {
_this spawn {
_projectile = _this select 6;
sleep getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "fuseDistance");
if (alive _projectile) then {
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
_affected = _projectile nearEntities ["CAManBase", 50];
{
[[_x, _projectile], "AGM_Grenades_fnc_flashbangEffect", _x] call AGM_Core_fnc_execRemoteFnc;
} forEach _affected;
};
};
if (typeOf _projectile == "ACE_G_M84") then {
// _fuzeTime = (configFile >> "CfgAmmo" >> typeOf _projectile >> "fuseDistance");
_fuzeTime = (configFile >> "CfgAmmo" >> typeOf _projectile >> "explosionTime"); //@toDo pretty sure this should be explosionTime not fuseDistance
[FUNC(flashbangThrownFuze), 0, [_projectile, (time + _fuzeTime)]] call CBA_fnc_addPerFrameHandler;
};

View File

@ -0,0 +1,19 @@
#include "script_component.hpp"
_projectile = (_this select 0) select 0;
_waitUntilTime = (_this select 0) select 1;
if (_waitUntilTime > time) exitWith {};
//remove frameEH
[(_this select 1)] call cba_fnc_removePerFrameHandler;
if (alive _projectile) then {
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
_affected = _projectile nearEntities ["CAManBase", 50];
{
// [[_x, _projectile], "ACE_Grenades_fnc_flashbangEffect", _x] call ACE_Core_fnc_execRemoteFnc;
// [[_x, _projectile], "ACE_Grenades_fnc_flashbangEffect", _x] call ACE_Core_fnc_execRemoteFnc;
} forEach _affected;
};

View File

@ -0,0 +1 @@
#include "\z\ace\addons\grenades\script_component.hpp"

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-09-11 -->
<Project name="AGM">
<Project name="ACE">
<Package name="Grenades">
<Key ID="STR_AGM_Grenades_SwitchGrenadeMode">
<Key ID="STR_ACE_Grenades_SwitchGrenadeMode">
<English>Switch Grenade Mode</English>
<German>Granaten-Modus wechseln</German>
<Spanish>Cambiar modo de granada</Spanish>
@ -14,7 +14,7 @@
<Italian>Cambia tipo di granata</Italian>
<Portuguese>Alternar Modo de Granada</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_NormalThrow">
<Key ID="STR_ACE_Grenades_NormalThrow">
<English>Normal Throw</English>
<German>Normaler Wurf</German>
<Spanish>Lanzamiento normal</Spanish>
@ -26,7 +26,7 @@
<Italian>Lancio normale</Italian>
<Portuguese>Arremesso Normal</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_HighThrow">
<Key ID="STR_ACE_Grenades_HighThrow">
<English>High Throw</English>
<German>Hoher Wurf</German>
<Spanish>Lanzamiento alto</Spanish>
@ -38,7 +38,7 @@
<Italian>Lancio verso l'alto</Italian>
<Portuguese>Arremesso Alto</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_PreciseThrow">
<Key ID="STR_ACE_Grenades_PreciseThrow">
<English>Precise Throw</English>
<German>Präziser Wurf</German>
<Spanish>Lanzamiento preciso</Spanish>
@ -50,7 +50,7 @@
<Italian>Lancio preciso</Italian>
<Portuguese>Arremesso Preciso</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_RollGrenade">
<Key ID="STR_ACE_Grenades_RollGrenade">
<English>Roll Grenade</English>
<German>Granate rollen</German>
<Spanish>Rodar granada</Spanish>
@ -62,7 +62,7 @@
<Italian>Fai rotolare la granata</Italian>
<Portuguese>Rolar Granada</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_DropGrenade">
<Key ID="STR_ACE_Grenades_DropGrenade">
<English>Drop Grenade</English>
<German>Granate fallenlassen</German>
<Spanish>Soltar granada</Spanish>
@ -74,7 +74,7 @@
<Italian>Lascia la granata</Italian>
<Portuguese>Largar Granada</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_M84_Name">
<Key ID="STR_ACE_Grenades_M84_Name">
<English>M84 Stun Grenade</English>
<German>M84 Blendgranate</German>
<Spanish>Granada aturdidora M84</Spanish>
@ -86,7 +86,7 @@
<Italian>Granata Stordente M84</Italian>
<Portuguese>M84 granada de atordoamento</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_M84_Description">
<Key ID="STR_ACE_Grenades_M84_Description">
<English>Also known as flashbang. Causes immediate flash blindness, deafness, tinnitus, and inner ear disturbance.</English>
<German>Verursacht temporäre Blind- und Taubheit.</German>
<Spanish>Produce de manera inmediata ceguera, sordera, tinitus y afecta el oído interior.</Spanish>
@ -98,7 +98,7 @@
<Italian>Anche conosciuta come flashbang. Causa accecamento immediato, sensazioni di sposatezza, mancanza d'equilibrio e disturbi al timpano.</Italian>
<Portuguese>Um tipo de granada não-letal destinado a confundir, desorientar e distrair uma potencial ameaça.</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_White_Name">
<Key ID="STR_ACE_Grenades_M127A1_White_Name">
<English>M127A1 Hand Held Signal (White)</English>
<German>M127A1 Leuchtmittel (Weiß)</German>
<Czech> M127A1 Světlice (Bílá)</Czech>
@ -110,7 +110,7 @@
<Spanish>Bengala M127A1 (Blanca)</Spanish>
<French>M127A1 Feux à main (Blanc)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Red_Name">
<Key ID="STR_ACE_Grenades_M127A1_Red_Name">
<English>M127A1 Hand Held Signal (Red)</English>
<German>M127A1 Leuchtmittel (Rot)</German>
<Czech>M127A1 Světlice (Červená)</Czech>
@ -122,7 +122,7 @@
<Spanish>Bengala M127A1 (Roja)</Spanish>
<French>M127A1 Feux à main (Rouge)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Green_Name">
<Key ID="STR_ACE_Grenades_M127A1_Green_Name">
<English>M127A1 Hand Held Signal (Green)</English>
<German>M127A1 Leuchtmittel (Grün)</German>
<Czech>M127A1 Světlice (Zelená)</Czech>
@ -134,7 +134,7 @@
<Spanish>Bengala M127A1 (Verde)</Spanish>
<French>M127A1 Feux à main (Vert)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Yellow_Name">
<Key ID="STR_ACE_Grenades_M127A1_Yellow_Name">
<English>M127A1 Hand Held Signal (Yellow)</English>
<German>M127A1 Leuchtmittel (Gelb)</German>
<Czech>M127A1 Světlice (Žlutá)</Czech>
@ -146,7 +146,7 @@
<Spanish>Bengala M127A1 (Amarilla)</Spanish>
<French>M127A1 Feux à main (Jaune)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_White_Description">
<Key ID="STR_ACE_Grenades_M127A1_White_Description">
<English>White Hand Flare</English>
<German>Weiße Leuchtkugel, wird wie eine Granate geworfen.</German>
<Czech>Světlice (Bílá)</Czech>
@ -158,7 +158,7 @@
<Spanish>Bengala (Blanca)</Spanish>
<French>Feux à main (Blanc)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Red_Description">
<Key ID="STR_ACE_Grenades_M127A1_Red_Description">
<English>Red Hand Flare</English>
<German>Rote Leuchtkugel, wird wie eine Granate geworfen.</German>
<Czech>Světlice (Červená)</Czech>
@ -170,7 +170,7 @@
<Spanish>Bengala (Roja)</Spanish>
<French>Feux à main (Rouge)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Green_Description">
<Key ID="STR_ACE_Grenades_M127A1_Green_Description">
<English>Green Hand Flare</English>
<German>Grüne Leuchtkugel, wird wie eine Granate geworfen.</German>
<Czech>Světlice (Zelená)</Czech>
@ -182,7 +182,7 @@
<Spanish>Bengala (Verde)</Spanish>
<French>Feux à main (Vert)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Yellow_Description">
<Key ID="STR_ACE_Grenades_M127A1_Yellow_Description">
<English>Yellow Hand Flare</English>
<German>Gelbe Leuchtkugel, wird wie eine Granate geworfen.</German>
<Czech>Světlice Žlutá</Czech>
@ -194,7 +194,7 @@
<Spanish>Bengala (Amarilla)</Spanish>
<French>Feux à main (Jaune)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_White_NameShort">
<Key ID="STR_ACE_Grenades_M127A1_White_NameShort">
<English>M127A1 (White)</English>
<German>M127A1 (Weiß)</German>
<Czech>M127A1 (Bílá)</Czech>
@ -206,7 +206,7 @@
<Russian>M127A1 (Белый)</Russian>
<Spanish>M127A1 (Blanca)</Spanish>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Red_NameShort">
<Key ID="STR_ACE_Grenades_M127A1_Red_NameShort">
<English>M127A1 (Red)</English>
<German>M127A1 (Rot)</German>
<Czech>M127A1 (Červená)</Czech>
@ -218,7 +218,7 @@
<Russian>M127A1 (Красный)</Russian>
<Spanish>M127A1 (Roja)</Spanish>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Green_NameShort">
<Key ID="STR_ACE_Grenades_M127A1_Green_NameShort">
<English>M127A1 (Green)</English>
<German>M127A1 (Grün)</German>
<Czech>M127A1 (Zelená)</Czech>
@ -230,7 +230,7 @@
<Russian>M127A1 (Зелёный)</Russian>
<Spanish>M127A1 (Verde)</Spanish>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Yellow_NameShort">
<Key ID="STR_ACE_Grenades_M127A1_Yellow_NameShort">
<English>M127A1 (Yellow)</English>
<German>M127A1 (Gelb)</German>
<Czech>M127A1 (Žlutá)</Czech>