Merge branch 'master' of github.com:KoffeinFlummi/ACE3

This commit is contained in:
Nicolás Badano 2015-02-15 11:42:54 -03:00
commit 7c95e33322
55 changed files with 791 additions and 1347 deletions

View File

@ -1,302 +1,43 @@
class CfgAmmo {
class BulletBase;
class B_20mm: BulletBase {
deflecting = 3;
hit = 100;
indirectHit = 10;
indirectHitRange = 2;
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
};
// adjust minigun caliber and deflection to other ammo
class SubmunitionBullet;
class B_65x39_Minigun_Caseless: SubmunitionBullet {
hit = 10;
indirectHit = 0;
indirectHitRange = 0;
caliber = 1;
deflecting = 5;
typicalSpeed = 850;
deflecting = 15;
};
class B_762x51_Minigun_Tracer_Red: SubmunitionBullet {
hit = 12;
indirectHit = 0;
indirectHitRange = 0;
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
caliber = 1.6;
deflecting = 5;
typicalSpeed = 850;
};
class M_Titan_AA;
class M_Zephyr: M_Titan_AA {
proxyShape = "\A3\Weapons_F\Ammo\Missile_AA_02_F.p3d";
model = "\A3\Weapons_F\Ammo\Missile_AA_02_fly_F.p3d";
airFriction = 0.078;
sideAirFriction = 0.18;
maneuvrability = 24;
class CamShakeFire {};
class CamShakePlayerFire {};
};
class M_Zephyr_Mi06: M_Zephyr {
maverickWeaponIndexOffset = 6;
};
class MissileBase;
class M_Air_AA: MissileBase {
model = "\A3\Weapons_F\Ammo\Missile_AT_02_fly_F";
proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_02_F";
hit = 280;
indirectHit = 85;
indirectHitRange = 10;
maneuvrability = 27;
simulationStep = 0.002;
airLock = 1;
irLock = 1;
cost = 1500;
//maxSpeed = 2400;
timeToLive = 40;
airFriction = 0.05;
sideAirFriction = 0.1;
trackOversteer = 1;
trackLead = 1;
initTime = 0;
thrustTime = 12;
thrust = 340;
fuseDistance = 500;
weaponLockSystem = "2 + 16";
maxControlRange = 8000;
class CamShakeExplode {};
class CamShakeHit {};
class CamShakeFire {};
class CamShakePlayerFire {};
};
class Missile_AA_04_F: MissileBase {
hit = 800;
indirectHit = 60;
indirectHitRange = 12;
airLock = 2;
irLock = 1;
laserLock = 0;
nvLock = 0;
weaponLockSystem = "2 + 16";
cmimmunity = 0.8;
initTime = 0;
thrust = 380;
thrustTime = 9.5;
airFriction = 0.04;
sideAirFriction = 0.08;
//maxSpeed = 2600;
maneuvrability = 14;
simulationStep = 0.002;
fuseDistance = 500;
timeToLive = 19;
trackLead = 1;
trackOversteer = 1;
deflecting = 15;
};
// also adjust tracer, "muh lightshow"; also adjust splash damage radius
class BulletBase;
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
model = "\A3\Weapons_f\Data\bullettracer\tracer_red.p3d";
cost = 20;
hit = 80;
indirectHit = 12;
indirectHitRange = 3;
indirectHitRange = 3; //2;
caliber = 1.4;
explosive = 0.6;
airlock = 1;
deflecting = 3;
airFriction = -0.00042;
typicalSpeed = 960;
visibleFire = 32;
audibleFire = 32;
visibleFireTime = 3;
fuseDistance = 3;
tracerScale = 2.5;
tracerStartTime = 0.02;
tracerEndTime = 4.7;
multiSoundHit[] = {"soundHit1",0.2,"soundHit2",0.2,"soundHit3",0.2,"soundHit4",0.1,"soundHit5",0.15,"soundHit6",0.15};
soundFly[] = {"A3\Sounds_F\weapons\Explosion\cannon_fly",1,1,50};
explosionSoundEffect = "DefaultExplosion";
explosionEffects = "ExploAmmoExplosion";
craterEffects = "ExploAmmoCrater";
soundHit1[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_1",3.16228,1,1600};
soundHit2[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_2",3.16228,1,1600};
soundHit3[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_3",3.16228,1,1600};
soundHit4[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_4",3.16228,1,1600};
soundHit5[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_5",3.16228,1,1600};
soundHit6[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_6",3.16228,1,1600};
class CamShakeExplode {};
class CamShakeHit {};
class CamShakeFire {};
class CamShakePlayerFire {};
};
// helper projectiles to simulate a rof > fps
class ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy: Gatling_30mm_HE_Plane_CAS_01_F {
simulation = "shotSubmunitions";
triggerTime = 0;
submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub";
submunitionConeType[] = {"custom", {{0,0}, {0,0}, {0,0}} };
};
class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {
};
class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {};
// adjust damage and splash damage, closer to bluefor gatling with same caliber
class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F {
model = "\A3\Weapons_f\Data\bullettracer\tracer_green.p3d";
hit = 70;
indirectHit = 11;
hit = 70; //40;
indirectHit = 11; //14;
indirectHitRange = 3;
caliber = 2;
explosive = 0.6;
};
class Missile_AGM_02_F: MissileBase {
model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_fly_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_F.p3d";
maverickWeaponIndexOffset = 2;
cost = 1500;
hit = 2100;
indirectHit = 85;
indirectHitRange = 8;
manualControl = 0;
maxControlRange = 8000;
airLock = 0;
irLock = 1;
laserLock = 0;
nvLock = 0;
weaponLockSystem = "2 + 16";
cmimmunity = 0.8;
initTime = 0;
thrust = 240;
thrustTime = 5;
airFriction = 0.05;
sideAirFriction = 0.1;
maxSpeed = 828;
maneuvrability = 27;
simulationStep = 0.002;
fuseDistance = 500;
timeToLive = 40;
trackLead = 1;
trackOversteer = 1;
craterEffects = "AAMissileCrater";
effectsMissile = "missile3";
explosionEffects = "AAMissileExplosion";
muzzleEffect = "BIS_fnc_effectFiredHeliRocket";
whistleDist = 20;
class CamShakeExplode {};
class CamShakeHit {};
class CamShakeFire {};
class CamShakePlayerFire {};
};
class LaserBombCore;
class Bomb_04_F: LaserBombCore {
model = "\A3\Weapons_F_EPC\Ammo\Bomb_04_fly_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Bomb_04_F.p3d";
maverickWeaponIndexOffset = 8;
hit = 6000;
indirectHit = 1400;
indirectHitRange = 15;
nvLock = 1;
weaponLockSystem = "2 + 16 + 4";
maneuvrability = 20;
fuseDistance = 35;
trackLead = 0.95;
trackOversteer = 1;
craterEffects = "BombCrater";
explosionEffects = "BombExplosion";
explosionSoundEffect = "DefaultExplosion";
explosionTime = 2;
multiSoundHit[] = {"soundHit1",0.2,"soundHit2",0.2,"soundHit3",0.2,"soundHit4",0.2,"soundHit5",0.2};
soundHit1[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_1",2.51189,1,2400};
soundHit2[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_2",2.51189,1,2400};
soundHit3[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_3",2.51189,1,2400};
soundHit4[] = {"\A3\Sounds_F\weapons\Explosion\expl_shell_1",2.51189,1,2400};
soundHit5[] = {"\A3\Sounds_F\weapons\Explosion\expl_shell_2",2.51189,1,2400};
whistleDist = 24;
};
class Rocket_04_HE_F: MissileBase {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_fly_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_F.p3d";
maverickWeaponIndexOffset = 12;
cost = 500;
hit = 210;
indirectHit = 55;
indirectHitRange = 15;
manualControl = 0;
maxControlRange = 8000;
airLock = 0;
irLock = 1;
laserLock = 0;
nvLock = 0;
weaponLockSystem = 0;
cmimmunity = 1;
initTime = 0.002;
thrust = 1600;
thrustTime = 0.7;
airFriction = 0.0046;
sideAirFriction = 0.005;
maxSpeed = 610;
maneuvrability = 0;
fuseDistance = 50;
timeToLive = 60;
effectsMissileInit = "MissileDAR1";
whistleDist = 30;
class CamShakeExplode {};
class CamShakeHit {};
class CamShakeFire {};
class CamShakePlayerFire {};
};
class Rocket_04_AP_F: Rocket_04_HE_F {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_fly_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_F.p3d";
maverickWeaponIndexOffset = 19;
hit = 400;
indirectHit = 20;
indirectHitRange = 10;
};
class Missile_AA_03_F: Missile_AA_04_F {
model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_fly_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_F.p3d";
maverickWeaponIndexOffset = 0;
hit = 900;
indirectHit = 50;
indirectHitRange = 15;
};
class Missile_AGM_01_F: Missile_AGM_02_F {
model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_fly_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_F.p3d";
maverickWeaponIndexOffset = 2;
hit = 2200;
indirectHit = 90;
indirectHitRange = 10;
};
class Bomb_03_F: Bomb_04_F {
model = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d";
maverickWeaponIndexOffset = 6;
hit = 6400;
indirectHit = 1400;
indirectHitRange = 16;
};
class Rocket_03_HE_F: Rocket_04_HE_F {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_fly_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
maverickWeaponIndexOffset = 8;
};
class Rocket_03_AP_F: Rocket_04_AP_F {
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_fly_F.p3d";
proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_F.p3d";
maverickWeaponIndexOffset = 28;
};
class RocketBase;
};

View File

@ -1,202 +1,15 @@
class CfgMagazines {
// shoot helper object to tripple rof
class VehicleMagazine;
class 24Rnd_PG_missiles;
class 12Rnd_PG_missiles: 24Rnd_PG_missiles {
count = 12;
displayName = "$STR_A3_CfgMagazines_12Rnd_PG_missiles0";
displayNameShort = "$STR_A3_CfgMagazines_12Rnd_PG_missiles_dns";
descriptionShort = "$STR_A3_CfgMagazines_12Rnd_PG_missiles1";
};
class 12Rnd_missiles: VehicleMagazine {
scope = 2;
count = 12;
ammo = "M_AT";
displayName = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles0";
displayNameShort = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles_dns";
descriptionShort = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles0";
initSpeed = 44;
maxLeadSpeed = 800;
nameSound = "rockets";
sound[] = {"A3\sounds_f\weapons\rockets\explosion_missile_01",1,1,1200};
reloadSound[] = {"",0.000316228,1};
};
//minigun magazines, muzzle velocities and tracercounts
class 200Rnd_65x39_Belt: VehicleMagazine {};
class 2000Rnd_65x39_Belt: 200Rnd_65x39_Belt {};
class 2000Rnd_65x39_Belt_Tracer_Red: 2000Rnd_65x39_Belt {
};
class 2000Rnd_65x39_Belt_Green: 2000Rnd_65x39_Belt {};
class 2000Rnd_65x39_Belt_Tracer_Green: 2000Rnd_65x39_Belt_Green {
tracersEvery = 1;
};
class 2000Rnd_65x39_Belt_Yellow: 2000Rnd_65x39_Belt {
tracersEvery = 1;
};
class 2000Rnd_65x39_Belt_Tracer_Yellow: 2000Rnd_65x39_Belt_Yellow {
tracersEvery = 1;
};
class 5000Rnd_762x51_Belt: 2000Rnd_65x39_Belt {
tracersEvery = 1;
count = 5000;
};
class 5000Rnd_762x51_Yellow_Belt: 5000Rnd_762x51_Belt {};
class 4000Rnd_762x51_M134 : 5000Rnd_762x51_Belt {
count = 4000;
tracersEvery = 1;
};
class 2000Rnd_762x51_M134 : 4000Rnd_762x51_M134 {
count = 2000;
tracersEvery = 1;
};
class 2Rnd_AAA_missiles: VehicleMagazine {
scope = 2;
displayName = "$STR_A3_CfgMagazines_2Rnd_AAA_missiles0";
displayNameShort = "$STR_A3_CfgMagazines_2Rnd_AAA_missiles_dns";
ammo = "M_Air_AA";
count = 2;
maxLeadSpeed = 950;
nameSound = "missiles";
};
class 2Rnd_AAA_missiles_MI02: 2Rnd_AAA_missiles {
ammo = "M_Air_AA_MI02";
};
class 4Rnd_AAA_missiles: 2Rnd_AAA_missiles {
displayName = "$STR_A3_CfgMagazines_4Rnd_AAA_missiles0";
displayNameShort = "$STR_A3_CfgMagazines_4Rnd_AAA_missiles_dns";
count = 4;
};
class 4Rnd_AAA_missiles_MI02: 4Rnd_AAA_missiles {
ammo = "M_Air_AA_MI02";
};
class 4Rnd_GAA_missiles: VehicleMagazine {
scope = 2;
displayName = "$STR_A3_CfgMagazines_4Rnd_GAA_missiles0";
displayNameShort = "$STR_A3_CfgMagazines_4Rnd_GAA_missiles_dns";
count = 4;
ammo = "M_Zephyr";
maxLeadSpeed = 950;
nameSound = "missiles";
};
class 300Rnd_20mm_shells: VehicleMagazine {
scope = 2;
displayName = "$STR_A3_CfgMagazines_300Rnd_20mm_shells0";
displayNameShort = "$STR_A3_CfgMagazines_300Rnd_20mm_shells_dns";
ammo = "B_20mm";
count = 300;
deflecting = 3;
maxLeadSpeed = 300;
tracersEvery = 5;
nameSound = "cannon";
};
class 1000Rnd_Gatling_30mm_Plane_CAS_01_F: VehicleMagazine {
scope = 2;
displayNameShort = "";
ammo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy";
count = 1170;
//count = 390;
//initSpeed = 3852;
maxLeadSpeed = 300;
nameSound = "cannon";
tracersEvery = 1;
};
class 2Rnd_Missile_AA_04_F: VehicleMagazine {
scope = 2;
displayNameShort = "$STR_A3_CFGMAGAZINES_4RND_AAA_MISSILES_DNS";
ammo = "Missile_AA_04_F";
count = 2;
maxLeadSpeed = 220;
nameSound = "missiles";
};
class 6Rnd_Missile_AGM_02_F: VehicleMagazine {
scope = 2;
displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
ammo = "Missile_AGM_02_F";
count = 6;
maxLeadSpeed = 450;
nameSound = "missiles";
};
class 2Rnd_Missile_AGM_02_F: VehicleMagazine {
scope = 2;
displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
ammo = "Missile_AGM_02_F";
count = 2;
maxLeadSpeed = 450;
nameSound = "missiles";
};
class 7Rnd_Rocket_04_HE_F: VehicleMagazine {
scope = 2;
displayNameShort = "$STR_A3_CFGMAGAZINES_40RND_20MM_G_BELT_DNS";
ammo = "Rocket_04_HE_F";
count = 7;
maxLeadSpeed = 200;
nameSound = "rockets";
};
class 7Rnd_Rocket_04_AP_F: 7Rnd_Rocket_04_HE_F {
displayNameShort = "$STR_A3_CFGMAGAZINES_TITAN_AP_DNS";
ammo = "Rocket_04_AP_F";
};
class 4Rnd_Bomb_04_F: VehicleMagazine {
scope = 2;
displayNameShort = "$STR_A3_CFGVEHICLES_BOMB0";
ammo = "Bomb_04_F";
count = 4;
maxLeadSpeed = 1000;
nameSound = "cannon";
};
class 500Rnd_Cannon_30mm_Plane_CAS_02_F: 1000Rnd_Gatling_30mm_Plane_CAS_01_F {
displayNameShort = "";
ammo = "Cannon_30mm_HE_Plane_CAS_02_F";
count = 500;
};
class 2Rnd_Missile_AA_03_F: 2Rnd_Missile_AA_04_F {
displayNameShort = "$STR_A3_CFGMAGAZINES_4RND_AAA_MISSILES_DNS";
ammo = "Missile_AA_03_F";
count = 2;
};
class 4Rnd_Missile_AGM_01_F: 6Rnd_Missile_AGM_02_F {
displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
ammo = "Missile_AGM_01_F";
count = 4;
};
class 20Rnd_Rocket_03_HE_F: 7Rnd_Rocket_04_HE_F {
displayNameShort = "$STR_A3_CFGMAGAZINES_40RND_20MM_G_BELT_DNS";
ammo = "Rocket_03_HE_F";
count = 20;
};
class 20Rnd_Rocket_03_AP_F: 7Rnd_Rocket_04_AP_F {
displayNameShort = "$STR_A3_CFGMAGAZINES_TITAN_AP_DNS";
ammo = "Rocket_03_AP_F";
count = 20;
};
class 2Rnd_Bomb_03_F: 4Rnd_Bomb_04_F {
displayNameShort = "$STR_A3_CFGVEHICLES_BOMB0";
ammo = "Bomb_03_F";
count = 2;
};
// an extended magazine for the comanche
class 300Rnd_20mm_shells;
class ACE_500Rnd_20mm_shells_Comanche: 300Rnd_20mm_shells {
displayName = "20mm";
displayNameShort = "20mm";
ammo = "B_20mm";
count = 500;
deflecting = 3;
initSpeed = 1030;
maxLeadSpeed = 300;
tracersEvery = 5;
};
};

View File

@ -8,12 +8,9 @@ class CfgVehicles {
class NewTurret {
class Turrets;
};
class CargoTurret;
};
class Air: AllVehicles {
class AnimationSources;
};
class Air: AllVehicles {};
class Helicopter: Air {
class Turrets {
@ -33,6 +30,7 @@ class CfgVehicles {
class Turrets: Turrets {
class CopilotTurret;
};
class AnimationSources;
};
class Helicopter_Base_H: Helicopter_Base_F {
@ -46,7 +44,7 @@ class CfgVehicles {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
//class MFD {};
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@ -55,14 +53,11 @@ class CfgVehicles {
};
};
class B_Heli_Light_01_F: Heli_Light_01_base_F {
class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {};
class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
class CargoTurret_01: CargoTurret {};
class CargoTurret_02: CargoTurret_01 {};
class CargoTurret_03: CargoTurret_02 {};
class CargoTurret_04: CargoTurret_01 {};
};*/
};
@ -70,7 +65,7 @@ class CfgVehicles {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
//class MFD {};
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@ -84,7 +79,8 @@ class CfgVehicles {
driverCanEject = 1;
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"};
magazines[] = {"2000Rnd_762x51_Belt_T_Green","12Rnd_PG_missiles","168Rnd_CMFlare_Chaff_Magazine"};
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@ -103,36 +99,7 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
//class MFD {};
class AnimationSources: AnimationSources {
class HitGlass1 {
source = "Hit";
hitpoint = "HitGlass1";
raw = 1;
};
class HitGlass2: HitGlass1 {
hitpoint = "HitGlass2";
};
class HitGlass3: HitGlass1 {
hitpoint = "HitGlass3";
};
class HitGlass4: HitGlass1 {
hitpoint = "HitGlass4";
};
class Gatling {
source = "revolving";
weapon = "ACE_gatling_20mm_Comanche";
};
class Hide {
source = "user";
animPeriod = 0;
initPhase = 0;
};
class Muzzle_flash {
source = "ammorandom";
weapon = "ACE_gatling_20mm_Comanche";
};
};
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
@ -141,6 +108,15 @@ class CfgVehicles {
magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"};
};
};
class AnimationSources: AnimationSources {
class Gatling {
weapon = "ACE_gatling_20mm_Comanche";
};
class Muzzle_flash {
weapon = "ACE_gatling_20mm_Comanche";
};
};
};
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {};
@ -149,6 +125,7 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
@ -160,6 +137,7 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@ -174,6 +152,7 @@ class CfgVehicles {
canEject = 1;
};
};
/*class UserActions {
class DoorL1_Open {
available = 1;
@ -195,16 +174,14 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
//class MFD {};
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
showHMD = 1;
};
class CargoTurret_01: CargoTurret {};
class CargoTurret_02: CargoTurret_01 {};
};
/*class UserActions: UserActions {
class DoorL1_Open {
available = 1;
@ -246,9 +223,9 @@ class CfgVehicles {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
//class MFD {};
weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher"};
magazines[] = {"5000Rnd_762x51_Yellow_Belt","24Rnd_missiles","168Rnd_CMFlare_Chaff_Magazine"};
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
@ -268,36 +245,37 @@ class CfgVehicles {
class I_Heli_light_03_F: I_Heli_light_03_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {};
class CargoTurret_01: CargoTurret {};
class CargoTurret_02: CargoTurret_01 {};
};
};
class I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {
//class MFD {};
};
class I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {};
class I_Heli_light_03_unarmed_F: I_Heli_light_03_unarmed_base_F {};
class Plane_CAS_01_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
//class MFD {};
class Turrets;
#include <flightmodel_thunderbolt.hpp>
};
class Plane_CAS_02_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Turrets;
#include <flightmodel_yak.hpp>
};
class Plane_Fighter_03_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Turrets;
#include <flightmodel_alca.hpp>
};
@ -308,34 +286,34 @@ class CfgVehicles {
};
class UAV_02_base_F: UAV {
weapons[] = {};
magazines[] = {};
class Turrets {
class MainTurret;
};
weapons[] = {};
magazines[] = {};
};
class UAV_02_CAS_base_F: UAV_02_base_F {
weapons[] = {};
magazines[] = {};
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
weapons[] = {};
magazines[] = {};
};
class B_Heli_Transport_03_base_F: Helicopter_Base_H {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
//class MainTurret: MainTurret {};
class RightDoorGun: MainTurret {};
class CargoTurret_01: CargoTurret {};
class CargoTurret_02: CargoTurret_01 {};
};
};
@ -346,9 +324,6 @@ class CfgVehicles {
};
//class MainTurret: MainTurret {};
//class RightDoorGun: MainTurret {};
//class CargoTurret_01: CargoTurret {};
//class CargoTurret_02: CargoTurret_01 {};
};
};
@ -356,6 +331,7 @@ class CfgVehicles {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
@ -374,15 +350,6 @@ class CfgVehicles {
class LoadmasterTurret: LoadmasterTurret {
canEject = 1;
};
class CargoTurret_01: CargoTurret {};
class CargoTurret_02: CargoTurret_01 {};
class CargoTurret_03: CargoTurret_01 {};
class CargoTurret_04: CargoTurret_01 {};
class CargoTurret_05: CargoTurret_01 {};
class CargoTurret_06: CargoTurret_05 {};
class CargoTurret_07: CargoTurret_05 {};
class CargoTurret_08: CargoTurret_05 {};
};
};
@ -394,9 +361,6 @@ class CfgVehicles {
class LoadmasterTurret: LoadmasterTurret {
canEject = 1;
};
class CargoTurret_01: CargoTurret {};
class CargoTurret_02: CargoTurret_01 {};
};
};
};

View File

@ -4,15 +4,10 @@ class Mode_Burst;
class Mode_FullAuto;
class CfgWeapons {
class MGunCore;
class MGun: MGunCore {};
class LMG_RCWS: MGun {};
// Manual Switching Of Flare Mode
class SmokeLauncher;
class CMFlareLauncher: SmokeLauncher {
modes[] = {"Single", "Burst", "AIBurst"};
modes[] = {"Single","Burst","AIBurst"};
class Single: Mode_SemiAuto {
reloadTime = 0.1;
};
@ -21,13 +16,15 @@ class CfgWeapons {
};
};
// bigger mag for comanche
class CannonCore;
class gatling_20mm: CannonCore {
magazines[] = {"2000Rnd_20mm_shells","1000Rnd_20mm_shells","300Rnd_20mm_shells","ACE_500Rnd_20mm_shells_Comanche"};
magazines[] += {"ACE_500Rnd_20mm_shells_Comanche"};
// buff gatling rof
class manual: CannonCore {
reloadTime = 0.023;
dispersion = 0.006;
reloadTime = 0.023; //0.04;
dispersion = 0.006; //0.0022;
};
class close: manual {};
class short: close {};
@ -36,21 +33,14 @@ class CfgWeapons {
};
class ACE_gatling_20mm_Comanche: gatling_20mm {
displayName = "XM301";
class close: close {
reloadTime = 0.04;
dispersion = 0.0022;
};
class far: far {
reloadTime = 0.04;
dispersion = 0.0022;
};
displayName = "$STR_ACE_Aircraft_gatling_20mm_Name";
class manual: manual {
reloadTime = 0.04;
dispersion = 0.0022;
displayName = "XM301";
displayName = "$STR_ACE_Aircraft_gatling_20mm_Name";
};
class medium: medium {
class close: close {
reloadTime = 0.04;
dispersion = 0.0022;
};
@ -58,38 +48,53 @@ class CfgWeapons {
reloadTime = 0.04;
dispersion = 0.0022;
};
class medium: medium {
reloadTime = 0.04;
dispersion = 0.0022;
};
class far: far {
reloadTime = 0.04;
dispersion = 0.0022;
};
};
// buff gatling rof
class MGunCore;
class MGun: MGunCore {};
class LMG_RCWS: MGun {};
class LMG_Minigun: LMG_RCWS {
magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt"};
class manual: MGun {
reloadTime = 0.015;
dispersion = 0.006;
reloadTime = 0.075; //0.015;
dispersion = 0.00093; //0.006;
};
class close: manual {};
class short: close {};
class medium: close {};
class far: close {};
};
class LMG_Minigun_heli: LMG_Minigun {
showAimCursorInternal = 0;
class manual: manual {
reloadTime = 0.015;
dispersion = 0.006;
reloadTime = 0.015; //0.033; Note: This is a way to fast ROF (requires over 60 FPS) @todo
dispersion = 0.006; //0.0087;
};
class close: manual {};
class short: close {};
class medium: close {};
class far: close {};
};
class M134_minigun: MGunCore {
class LowROF: Mode_FullAuto {
reloadTime = 0.015;
dispersion = 0.006;
reloadTime = 0.015; //0.03; same as above @todo
dispersion = 0.006; //0.0023;
};
class HighROF: LowROF {
reloadTime = 0.015;
dispersion = 0.006;
reloadTime = 0.015; //0.03;
dispersion = 0.006; //0.0023;
};
class close: HighROF {};
class short: close {};
@ -100,19 +105,10 @@ class CfgWeapons {
class Gatling_30mm_Plane_CAS_01_F: CannonCore {
autoFire = 1;
burst = 1;
reloadTime = 0.0154;
class LowROF: Mode_FullAuto {
autoFire = 0;
//burst = 65;
burst = 22;
//reloadTime = 0.0154;
reloadTime = 0.0462;
//sound[] = {"A3\Sounds_F_epc\weapons\cas_02_cannon",1.77828,1,3800};
sound[] = {"A3\Sounds_F_EPC\Weapons\gau_03_burst",2.51189,1,4500,{25704,32159}};
weaponSoundEffect = "DefaultRifle";
dispersion = 0.005;
soundContinuous = 1;
textureType = "burst";
burst = 22; //65;
reloadTime = 0.0462; //0.0154; //0.034;
multiplier = 3;
};
class close: LowROF {};
@ -121,120 +117,4 @@ class CfgWeapons {
class medium: close {};
class far: close {};
};
class RocketPods;
class Missile_AA_04_Plane_CAS_01_F: RocketPods {
holdsterAnimValue = 2;
aiRateOfFire = 5;
aiRateOfFireDistance = 500;
autoFire = 0;
cursor = "EmptyCursor";
cursorAim = "missile";
nameSound = "MissileLauncher";
textureType = "fullAuto";
weaponLockDelay = 3;
minRange = 300;
minRangeProbab = 0.25;
midRange = 2500;
midRangeProbab = 0.9;
maxRange = 9000;
maxRangeProbab = 0.01;
};
class MissileLauncher;
class Missile_AGM_02_Plane_CAS_01_F: MissileLauncher {
holdsterAnimValue = 3;
magazineReloadTime = 30;
reloadTime = 0.001;
textureType = "semi";
weaponLockDelay = 3;
weaponSoundEffect = "DefaultRifle";
};
class Rocket_04_HE_Plane_CAS_01_F: RocketPods {
holdsterAnimValue = 4;
canLock = 1;
modes[] = {"Far_AI","Medium_AI","Close_AI","Burst"};
weaponLockDelay = 0;
class Far_AI: RocketPods {
canLock = 1;
weaponLockDelay = 0;
showToPlayer = 0;
minRange = 800;
minRangeProbab = 0.31;
midRange = 2500;
midRangeProbab = 0.71;
maxRange = 3200;
maxRangeProbab = 0.1;
burst = 1;
reloadTime = 0.001;
autoFire = 0;
aiRateOfFire = 5;
aiRateOfFireDistance = 500;
};
class Medium_AI: Far_AI {};
class Close_AI: Far_AI {};
class Burst: RocketPods {
burst = 1;
reloadTime = 0.002;
minRange = 300;
minRangeProbab = 0.25;
midRange = 400;
midRangeProbab = 0.7;
maxRange = 1300;
maxRangeProbab = 0.1;
aiRateOfFire = 5;
aiRateOfFireDistance = 500;
autoFire = 0;
soundContinuous = 0;
textureType = "fullAuto";
weaponSoundEffect = "DefaultRifle";
};
};
class Rocket_04_AP_Plane_CAS_01_F: Rocket_04_HE_Plane_CAS_01_F {
holdsterAnimValue = 5;
};
class Bomb_04_Plane_CAS_01_F: RocketPods {
holdsterAnimValue = 6;
aiRateOfFire = 5;
aiRateOfFireDistance = 500;
missileLockCone = 180;
nameSound = "";
textureType = "fullAuto";
weaponLockDelay = 1;
};
class Cannon_30mm_Plane_CAS_02_F: CannonCore {
scope = 1;
holdsterAnimValue = 1;
ballisticsComputer = 2;
canLock = 1;
modes[] = {"LowROF","close","near","short","medium","far"};
nameSound = "cannon";
shotFromTurret = 0;
muzzlePos = "Cannon_muzzleflash";
muzzleEnd = "Cannon_barrel_end";
selectionFireAnim = "Cannon_muzzleflash";
autoFire = 1;
burst = 5;
reloadTime = 0.04;
class GunParticles {
class Effect {
effectName = "MachineGun2";
positionName = "Cannon_barrel_start";
directionName = "Cannon_barrel_end";
};
};
class LowROF: Mode_FullAuto {
dispersion = 0.0055;
reloadTime = 0.04;
};
class close: LowROF {};
class near: close {};
class short: close {};
class medium: close {};
class far: close {};
};
};

View File

@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"KoffeinFlummi","Crusty"};
author[] = {"KoffeinFlummi","Crusty","commy2"};
authorUrl = "https://github.com/KoffeinFlummi/";
VERSION_CONFIG;
};

View File

@ -14,6 +14,18 @@
<Portuguese>Rajada</Portuguese>
<Italian>Raffica</Italian>
</Key>
<Key ID="STR_ACE_Aircraft_gatling_20mm_Name">
<English>XM301</English>
<German>XM301</German>
<Spanish>XM301</Spanish>
<Polish>XM301</Polish>
<Czech>XM301</Czech>
<French>XM301</French>
<Russian>XM301</Russian>
<Hungarian>XM301</Hungarian>
<Portuguese>XM301</Portuguese>
<Italian>XM301</Italian>
</Key>
<Key ID="STR_ACE_Aircraft_OpenCargoRamp">
<English>Open Cargo Door</English>
<German>Laderampe öffnen</German>
@ -35,4 +47,4 @@
<Russian>Закрыть грузовой отсек</Russian>
</Key>
</Package>
</Project>
</Project>

View File

@ -1,5 +1,6 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
};

View File

@ -1,10 +1,12 @@
class CfgMagazines {
class CA_Magazine;
class B_IR_Grenade: CA_Magazine {
ACE_Attachable = 1;
};
class SmokeShell;
class Chemlight_green: SmokeShell {
ACE_Attachable = 1;
};
};
};

View File

@ -1,7 +1,3 @@
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
#define MACRO_ATTACHTOVEHICLE \
class ACE_Actions { \
@ -32,16 +28,20 @@ class CfgVehicles {
class Car: LandVehicle {
MACRO_ATTACHTOVEHICLE
};
class Tank: LandVehicle {
MACRO_ATTACHTOVEHICLE
};
class Air;
class Helicopter: Air {
MACRO_ATTACHTOVEHICLE
};
class Plane: Air {
MACRO_ATTACHTOVEHICLE
};
class Ship;
class Ship_F: Ship {
MACRO_ATTACHTOVEHICLE
@ -98,6 +98,7 @@ class CfgVehicles {
onlyInNvg = 1;
useFlare = 0;
};
side = 7;//-1=NO_SIDE yellow box,3=CIV grey box,4=NEUTRAL yellow box,6=FRIENDLY green box,7=LOGIC no radar signature
accuracy = 1000;
cost = 0;
@ -113,37 +114,36 @@ class CfgVehicles {
};
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class FIA_Box_Base_F;
class Box_NATO_Support_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
class EAST_Box_Base;
class Box_East_Support_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
class IND_Box_Base;
class Box_IND_Support_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
class FIA_Box_Base_F;
class Box_FIA_Support_F: FIA_Box_Base_F {
class TransportItems {
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
};
};
};
};

View File

@ -1,16 +1,19 @@
class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_F;
class ACE_IR_Strobe_Item: ACE_ItemCore {
ACE_attachable = 1;
author = "$STR_ACE_Common_ACETeam";
scope = 2;
displayName = "$STR_ACE_IrStrobe_Name";
descriptionShort = "$STR_ACE_IrStrobe_Description";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
picture = PATHTOF(UI\irstrobe_item.paa);
scope = 2;
ACE_attachable = 1;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
};
};

View File

@ -5,17 +5,14 @@ class CfgPatches {
units[] = {};
weapons[] = {"ACE_IR_Strobe_Item"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common", "ace_interaction"};
author[] = {"KoffeinFlummi", "eRazeri", "CAA-Picard"};
requiredAddons[] = {"ace_interaction"};
author[] = {"KoffeinFlummi","eRazeri","CAA-Picard"};
authorUrl = "https://github.com/KoffeinFlummi/";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

View File

@ -20,31 +20,33 @@
PARAMS_3(_unit,_attachToVehicle,_itemName);
//Sanity Check (_unit has item in inventory, not over attach limit)
if (!([_unit,_attachToVehicle,_itemName] call FUNC(canAttach))) exitWith {ERROR("Tried to attach, but check failed");};
if !([_unit, _attachToVehicle, _itemName] call FUNC(canAttach)) exitWith {ERROR("Tried to attach, but check failed");};
private ["_itemVehClass", "_onAtachText", "_selfAttachPosition"];
_selfAttachPosition = [_unit, [-0.05,0,0.12], "rightshoulder"];
_itemVehClass = "";
_onAtachText = "";
_selfAttachPosition = [_unit, [-0.05, 0, 0.12], "rightshoulder"];
switch true do {
case (_itemName == "ACE_IR_Strobe_Item"): {
switch (true) do {
case (_itemName == "ACE_IR_Strobe_Item"): {
_itemVehClass = "ACE_IR_Strobe_Effect";
_onAtachText = localize "STR_ACE_Attach_IrStrobe_Attached";
_selfAttachPosition = [_unit,[0,-0.11,0.16],"pilot"]; //makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri
//_selfAttachPosition = [_unit, [0, -0.11, 0.16], "pilot"]; //makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri
};
case (_itemName == "B_IR_Grenade"): {
case (_itemName == "B_IR_Grenade"): {
_itemVehClass = "B_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
case (_itemName == "O_IR_Grenade"): {
case (_itemName == "O_IR_Grenade"): {
_itemVehClass = "O_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
case (_itemName == "I_IR_Grenade"): {
case (_itemName == "I_IR_Grenade"): {
_itemVehClass = "I_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}): {
case (toLower _itemName in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]): {
_itemVehClass = _itemName;
_onAtachText = localize "STR_ACE_Attach_Chemlight_Attached";
};
@ -57,8 +59,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
_attachedItem = _itemVehClass createVehicle [0,0,0];
_attachedItem attachTo _selfAttachPosition;
[_onAtachText] call EFUNC(common,displayTextStructured);
_attachToVehicle setVariable ["ACE_AttachedObjects", [_attachedItem], true];
_attachToVehicle setVariable ["ACE_AttachedItemNames", [_itemName], true];
_attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true];
_attachToVehicle setVariable [QGVAR(ItemNames), [_itemName], true];
} else {
GVAR(setupObject) = _itemVehClass createVehicleLocal [0,0,-10000];
GVAR(setupObject) enableSimulationGlobal false;
@ -72,17 +74,17 @@ if (_unit == _attachToVehicle) then { //Self Attachment
private "_player";
_player = ACE_player;
//Stop if player switch or player gets to far from vehicle
if ((GVAR(placer) != _player) || {(_player distance GVAR(SetupAttachVehicle)) > 7}) exitWith {
if (GVAR(placer) != _player || {_player distance GVAR(SetupAttachVehicle) > 7}) exitWith {
call FUNC(placeCancel);
};
GVAR(pfeh_running) = true;
_pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]);
GVAR(setupObject) setPosATL _pos;
}] call BIS_fnc_addStackedEventHandler;
}] call BIS_fnc_addStackedEventHandler; // @todo replace with CBA PFH
//had to delay the mouseHint, not sure why
[{[localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] call EFUNC(interaction,showMouseHint)}, [], 0, 0] call EFUNC(common,waitAndExecute);
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {GVAR(pfeh_running) AND !isNull (GVAR(setupObject))}, {call FUNC(placeApprove);}] call EFUNC(common,AddActionEventHandler)];
_unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) AND !isNull (GVAR(setupObject))}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeApprove);}] call EFUNC(common,AddActionEventHandler)];
_unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
};

View File

@ -19,7 +19,9 @@
PARAMS_3(_unit,_attachToVehicle,_item);
_attachLimit = if (_unit == _attachToVehicle) then {1} else {10};
_attachedObjects = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
private ["_attachLimit", "_attachedObjects"];
canStand _unit && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_item in ((magazines _unit) + (items _unit) + [""])}
_attachLimit = [10, 1] select (_unit == _attachToVehicle);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
canStand _unit && {alive _attachToVehicle} && {count _attachedObjects < _attachLimit} && {_item in (itemsWithMagazines _unit + [""])}

View File

@ -16,24 +16,25 @@
*/
#include "script_component.hpp"
private ["_attachedObjects", "_inRange", "_unitPos", "_objectPos"];
PARAMS_2(_unit,_attachToVehicle);
_attachedObjects = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
private ["_attachedObjects", "_inRange"];
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_inRange = false;
if (_unit == _attachToVehicle) then {
_inRange = (count _attachedObjects) > 0;
_inRange = count _attachedObjects > 0;
} else {
//Scan if unit is within range (using 2d distance)
private ["_unitPos", "_objectPos"];
_unitPos = getPos _unit;
_unitPos set [2,0];
{
_objectPos = getPos _x;
_objectPos set [2, 0];
if ((_objectPos distance _unitPos) < 4) exitWith {_inRange = true};
if (_objectPos distance _unitPos < 4) exitWith {_inRange = true};
} forEach _attachedObjects;
};
(canStand _unit) && _inRange && {alive _attachToVehicle}
canStand _unit && {_inRange} && {alive _attachToVehicle}

View File

@ -16,12 +16,14 @@
*/
#include "script_component.hpp"
private ["_itemName", "_count", "_attachedItem", "_fnc_detachDelay"];
PARAMS_2(_unit,_attachToVehicle);
_attachedObjectsArray = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
_attachedItemsArray = _attachToVehicle getVariable ["ACE_AttachedItemNames", []];
private ["_attachedObjects", "_attachedItems"];
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];
private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"];
_attachedObject = objNull;
_attachedIndex = -1;
@ -34,53 +36,51 @@ _unitPos set [2,0];
{
_objectPos = getPos _x;
_objectPos set [2, 0];
if ((_objectPos distance _unitPos) < _minDistance) then {
_minDistance = (_objectPos distance _unitPos);
if (_objectPos distance _unitPos < _minDistance) then {
_minDistance = _objectPos distance _unitPos;
_attachedObject = _x;
_itemName = _attachedItemsArray select _forEachIndex;
_itemName = _attachedItems select _forEachIndex;
_attachedIndex = _forEachIndex;
};
} forEach _attachedObjectsArray;
} forEach _attachedObjects;
// Check if unit has an attached item
if ((isNull _attachedObject) || {_itemName == ""}) exitWith {ERROR("Could not find attached object")};
if (isNull _attachedObject || {_itemName == ""}) exitWith {ERROR("Could not find attached object")};
// Add item to inventory
_count = (count items _unit) + (count magazines _unit);
_unit addItem _itemName;
if ((count items _unit) + (count magazines _unit) <= _count) exitWith {
// Exit if can't add the item
if !(_unit canAdd _itemName) exitWith {
[localize "STR_ACE_Attach_Inventory_Full"] call EFUNC(common,displayTextStructured);
};
if (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") then {
// Add item to inventory
_unit addItem _itemName;
if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then {
// Hack for dealing with X_IR_Grenade effect not dissapearing on deleteVehicle
detach _attachedObject;
_attachedObject setPos [getPos _unit select 0, getPos _unit select 1, ((getPos _unit select 2) - 1000)];
_attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
// Delete attached item after 0.5 seconds
_fnc_detachDelay = {
deleteVehicle (_this select 0);
};
[_fnc_detachDelay, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute);
[{deleteVehicle (_this select 0)}, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute);
} else {
// Delete attached item
deleteVehicle _attachedObject;
};
// Reset unit variables
_attachedObjectsArray deleteAt _attachedIndex;
_attachedItemsArray deleteAt _attachedIndex;
_attachToVehicle setVariable ["ACE_AttachedObjects", _attachedObjectsArray, true];
_attachToVehicle setVariable ["ACE_AttachedItemNames", _attachedItemsArray, true];
_attachedObjects deleteAt _attachedIndex;
_attachedItems deleteAt _attachedIndex;
_attachToVehicle setVariable [QGVAR(Objects), _attachedObjects, true];
_attachToVehicle setVariable [QGVAR(ItemNames), _attachedItems, true];
// Display message
switch true do {
case (_itemName == "ACE_IR_Strobe_Item") : {
switch (true) do {
case (_itemName == "ACE_IR_Strobe_Item") : {
[localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
};
case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : {
case (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) : {
[localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured);
};
case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : {
case (toLower _itemName in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]) : {
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
};
};

View File

@ -55,13 +55,13 @@ _attachables = items _unit;
} forEach _attachables;
[
_actions,
{
[ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
call EFUNC(interaction,hideMenu);
},
{
call EFUNC(interaction,hideMenu);
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
}
_actions,
{
[ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
call EFUNC(interaction,hideMenu);
},
{
call EFUNC(interaction,hideMenu);
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
}
] call EFUNC(interaction,openSelectMenu);

View File

@ -100,11 +100,11 @@ _attachedObject attachTo [_attachToVehicle, _endPosTestOffset];
_placer removeItem _itemClassname;
//Add Object to ACE_AttachedObjects and ACE_AttachedItemNames
_currentObjects = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
_currentObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_currentObjects pushBack _attachedObject;
_attachToVehicle setVariable ["ACE_AttachedObjects", _currentObjects, true];
_currentItemNames = _attachToVehicle getVariable ["ACE_AttachedItemNames", []];
_attachToVehicle setVariable [QGVAR(Objects), _currentObjects, true];
_currentItemNames = _attachToVehicle getVariable [QGVAR(ItemNames), []];
_currentItemNames pushBack _itemClassname;
_attachToVehicle setVariable ["ACE_AttachedItemNames", _currentItemNames, true];
_attachToVehicle setVariable [QGVAR(ItemNames), _currentItemNames, true];
[_placementText] call EFUNC(common,displayTextStructured);

View File

@ -176,4 +176,4 @@
<Spanish>Error en Acoplar</Spanish>
</Key>
</Package>
</Project>
</Project>

View File

@ -1,10 +1,22 @@
// by commy2
/*
* Author: commy2
* Fixes the lowered rifle animation
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [_player] call ace_common_fnc_fixLoweredRifleAnimation
*
* Public: No
*/
#include "script_component.hpp"
private "_unit";
PARAMS_1(_unit);
_unit = _this select 0;
if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"}) then {
if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"} && {(vehicle _unit) == _unit}) then {
[_unit, "amovpercmstpsraswrfldnon", 0] call FUNC(doAnimation);
};

View File

@ -16,7 +16,7 @@
EXPLODE_2_PVT(_this,_unit,_weapon);
if (_weapon = "") exitWith {-1};
if (_weapon == "") exitWith {-1};
[
primaryWeapon _unit,

View File

@ -432,7 +432,9 @@ class CfgVehicles {
};*/
};
class B_Heli_Light_01_F: Heli_Light_01_base_F {
class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {};
class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
};*/

View File

@ -9,6 +9,7 @@ PREP(canUseRangefinder);
PREP(firedEH);
PREP(getAngle);
PREP(getRange);
PREP(handleAirBurstAmmunitionPFH);
PREP(keyDown);
PREP(keyUp);
PREP(reset);

View File

@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {ace_common, ace_interaction};
author[] = {"KoffeinFlummi","BadGuy (simon84)"};
author[] = {"KoffeinFlummi","BadGuy (simon84)","commy2"};
authorUrl = "https://github.com/KoffeinFlummi/";
VERSION_CONFIG;
};

View File

@ -12,4 +12,4 @@
#include "script_component.hpp"
count ((vehicle ACE_player) getVariable [format ["%1_%2", QGVAR(Magazines), [vehicle ACE_player] call EFUNC(common,getTurretIndex)], []]) > 1
count ((vehicle ACE_player) getVariable [format ["%1_%2", QGVAR(Magazines), [ACE_player] call EFUNC(common,getTurretIndex)], []]) > 1

View File

@ -25,7 +25,8 @@ private ["_gunner", "_turret"];
_gunner = [_vehicle, _weapon] call EFUNC(common,getGunner);
_turret = [_gunner] call EFUNC(common,getTurretIndex);
//if (ACE_player != _gunner) exitWith {}; // global
// Exit if the unit isn't a player
if !([_gunner] call EFUNC(common,isPlayer)) exitWith {};
private ["_FCSMagazines", "_FCSElevation", "_offset"];
@ -45,26 +46,16 @@ _offset = 0;
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, 0] call EFUNC(common,changeProjectileDirection);
// Air burst missile
// may need to get rewritten
if (getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_Airburst") == 1) then {
_this spawn {
_vehicle = _this select 0;
_projectile = _this select 6;
_distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], currentZeroing _vehicle];
// handle locally only
if (!local _gunner) exitWith {};
if (_distance < 50) exitWith {};
if (_distance > 1500) exitWith {};
if (getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(Airburst)) == 1) then {
private "_zeroing";
_zeroing = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], currentZeroing _vehicle];
waitUntil {_projectile distance _vehicle > _distance || {!alive _projectile}};
if (!alive _projectile) exitWith {};
if (_zeroing < 50) exitWith {};
if (_zeroing > 1500) exitWith {};
_position = getPosATL _projectile;
_subMunition = createVehicle ["ACE_B_35mm_ABM_Helper", _position, [], 0, "FLY"];
_subMunition setPosATL _position;
_subMunition setVelocity [0, 0, -10];
deleteVehicle _projectile;
};
[FUNC(handleAirBurstAmmunitionPFH), 0, [_vehicle, _projectile, _zeroing]] call CBA_fnc_addPerFrameHandler;
};

View File

@ -0,0 +1,21 @@
// by commy2
_vehicle = _this select 0 select 0;
_projectile = _this select 0 select 1;
_zeroing = _this select 0 select 2;
if (isNull _projectile || {!alive _projectile}) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
if (_projectile distance _vehicle < _zeroing) exitWith {};
_position = getPosATL _projectile;
_subMunition = createVehicle ["ACE_B_35mm_ABM_Helper", _position, [], 0, "FLY"];
_subMunition setPosATL _position;
_subMunition setVelocity [0, 0, -10];
deleteVehicle _projectile;
[_this select 1] call CBA_fnc_removePerFrameHandler;

View File

@ -155,9 +155,9 @@ _FCSElevation = [];
};
} forEach _magazines;
_vehicle setVariable [format ["%1_%2", QGVAR(Distance), _turret], _distance, true];
_vehicle setVariable [format ["%1_%2", QGVAR(Magazines), _turret], _FCSMagazines, true];
_vehicle setVariable [format ["%1_%2", QGVAR(Elevation), _turret], _FCSElevation, true];
_vehicle setVariable [format ["%1_%2", QGVAR(Azimuth), _turret], _FCSAzimuth, true];
[_vehicle, format ["%1_%2", QGVAR(Distance), _turret], _distance] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Magazines), _turret], _FCSMagazines] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Elevation), _turret], _FCSElevation] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Azimuth), _turret], _FCSAzimuth] call EFUNC(common,setVariablePublic);
[format ["%1: %2", localize "STR_ACE_FCS_ZeroedTo", _distance]] call EFUNC(common,displayTextStructured);

View File

@ -12,13 +12,14 @@
#include "script_component.hpp"
private "_vehicle";
private ["_vehicle", "_turret"];
_vehicle = _this select 0;
_turret = _this select 1;
_vehicle setVariable [QGVAR(Distance), 0, true];
_vehicle setVariable [QGVAR(Magazines), [], true];
_vehicle setVariable [QGVAR(Elevation), 0, true];
_vehicle setVariable [QGVAR(Azimuth), 0, true];
[_vehicle, format ["%1_%2", QGVAR(Distance), _turret], 0] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Magazines), _turret], []] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Elevation), _turret], 0] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Azimuth), _turret], 0] call EFUNC(common,setVariablePublic);
[localize "STR_ACE_FCS_HasBeenReset"] call EFUNC(common,displayTextStructured);

View File

@ -1,7 +1,7 @@
/*
* Author: KoffeinFlummi
* Author: KoffeinFlummi, commy2
*
* Checks if a vehicle is equipped with an FCS and if so, adds the fired event handler
* Checks if a vehicle is equipped with an FCS and if so, adds the fired event handler. Execute on server.
*
* Arguments:
* 0: Vehicle

View File

@ -1,9 +1,4 @@
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
}
class CfgVehicles {
class NATO_Box_Base;
class Box_NATO_Support_F: NATO_Box_Base {

View File

@ -1,89 +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 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 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_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;
model = PATHTOF(models\ACE_m84_thrown.p3d);
};
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;
model = PATHTOF(models\ACE_m84_thrown.p3d);
};
};

View File

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

View File

@ -1,60 +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 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;
};
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

@ -1,45 +1,45 @@
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
name = #ITEM; \
count = COUNT; \
};
class CfgVehicles {
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class Box_NATO_Support_F;
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_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_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 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)
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

@ -1,23 +1,23 @@
class CfgWeapons {
class GrenadeLauncher;
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 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"};
};
};
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,28 @@
// by commy2
#include "script_component.hpp"
["flashbangExplosion", {_this call FUNC(flashbangExplosionEH)}] call EFUNC(common,addEventHandler);
if !(hasInterface) exitWith {};
GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
// Add keybinds
["ACE3",
localize "STR_ACE_Grenades_SwitchGrenadeMode",
{
// Conditions: canInteract
_exceptions = [QEGVAR(captives,isNotEscorting)];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
// Statement
[] call FUNC(nextMode);
},
[9, [false, false, false]], //8 key
false,
"keydown"
] call cba_fnc_registerKeybind;

View File

@ -1,13 +0,0 @@
// by commy2
#include "script_component.hpp"
GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
["ACE3",
localize "STR_ACE_Grenades_SwitchGrenadeMode",
{_this call FUNC(nextMode)},
[9, [false, false, false]], //8 key
false,
"keydown"] call cba_fnc_registerKeybind;

View File

@ -2,12 +2,9 @@
ADDON = false;
PREP(flashbangEffectStages);
PREP(flashbangExplosionEH);
PREP(flashbangThrownFuze);
PREP(nextMode);
PREP(throwGrenade);
["flashbangExplosion", { _this call DFUNC(flashbangExplosionEH) }] call EFUNC(common,addEventHandler);
ADDON = true;

View File

@ -1,15 +1,15 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"commy2", "KoffeinFlummi"};
authorUrl = "https://github.com/commy2/";
VERSION_CONFIG;
};
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"commy2", "KoffeinFlummi"};
authorUrl = "https://github.com/commy2/";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"

View File

@ -1,57 +0,0 @@
/*
* Author: KoffeinFlummi, Pabst Mirror
*
* Handles the different stages of the flash bang effect recovery
*
* Arguments:
* ARRAY[
* 0-ARRAY - PARAMS:
* 0: NUMBER - Stage, controls a case statement
* 1: NUMBER - Time To Wait Until
* 2: VARIES - Stage's Variable
* 1-NUMBER perFrame handle
* Return Value:
* None
*/
#include "script_component.hpp"
private ["_stage", "_waitUntilTime"];
_stage = (_this select 0) select 0;
_waitUntilTime = (_this select 0) select 1;
if (_waitUntilTime > time) exitWith {};
//remove frameEH
[(_this select 1)] call cba_fnc_removePerFrameHandler;
switch (_stage) do {
case(EFFECT_STAGE_RESETAI): {
private "_unit";
_unit = (_this select 0) select 2;
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "AUTOTARGET";
_unit enableAI "TARGET";
_unit enableAI "FSM";
_unit setSkill (skill _unit * 50);
};
case(EFFECT_STAGE_DELETELIGHT): {
private "_light";
_light = (_this select 0) select 2;
deleteVehicle _light;
};
case(EFFECT_STAGE_PARTIALRECOVERY): {
private "_strength";
_strength = (_this select 0) select 2;
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength);
};
case(EFFECT_STAGE_FULLRECOVERY): {
GVAR(flashbangPPEffectCC) ppEffectEnable false;
};
default {
TRACE_1("EffectStage Bad Stage", _stage);
};
};

View File

@ -1,85 +1,109 @@
/*
* Author: KoffeinFlummi
*
* Creates the flashbang effect and knock out AI units.
*
* Arguments:
* 0: The grenade (Object)
*
* Return Value:
* None
*/
* Author: KoffeinFlummi
* Creates the flashbang effect and knock out AI units.
*
* Arguments:
* 0: The grenade <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [theGrenade] call ace_grenades_fnc_flashbangExplosionEH
*
* Public: No
*/
#include "script_component.hpp"
private ["_grenade", "_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light"];
private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light"];
_grenade = _this select 0;
PARAMS_1(_grenade);
_affected = _grenade nearEntities ["CAManBase", 50];
{
if ((local _x) && {alive _x}) then {
if ((local _x) && {alive _x}) then {
_strength = 1 - ((_x distance _grenade) min 15) / 15;
_strength = 1 - ((_x distance _grenade) min 15) / 15;
if (_x != ACE_player) then {
//must be AI
_x disableAI "MOVE";
_x disableAI "ANIM";
_x disableAI "AUTOTARGET";
_x disableAI "TARGET";
_x disableAI "FSM";
_x setSkill ((skill _x) / 50);
if (_x != ACE_player) then {
//must be AI
_x disableAI "MOVE";
_x disableAI "ANIM";
_x disableAI "AUTOTARGET";
_x disableAI "TARGET";
_x disableAI "FSM";
_x setSkill ((skill _x) / 50);
[FUNC(flashbangEffectStages), 0, [EFFECT_STAGE_RESETAI, (time + (7 * _strength)), _x]] call CBA_fnc_addPerFrameHandler;
} else {
//Do effects for player
// is there line of sight to the grenade?
_posGrenade = getPosASL _grenade;
_posGrenade set [2, (_posGrenade select 2) + 0.2]; // compensate for grenade glitching into ground
if (lineIntersects [_posGrenade, getPosASL _x, _grenade, _x]) then {
_strength = _strength / 10;
};
[{
PARAMS_1(_unit);
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "AUTOTARGET";
_unit enableAI "TARGET";
_unit enableAI "FSM";
_unit setSkill (skill _unit * 50);
}, [_x], (7 * _strength), 0.1] call EFUNC(common,waitAndExecute); //0.1 precision is fine for AI
} else {
//Do effects for player
// is there line of sight to the grenade?
_posGrenade = getPosASL _grenade;
_posGrenade set [2, (_posGrenade select 2) + 0.2]; // compensate for grenade glitching into ground
if (lineIntersects [_posGrenade, getPosASL _x, _grenade, _x]) then {
_strength = _strength / 10;
};
// beeeeeeeeeeeeeeeeeeeeeeeeeeeeep
if (isClass (configFile >> "CfgPatches" >> "ACE_Hearing") and _strength > 0) then {
[_x, 0.5 + (_strength / 2)] call EFUNC(hearing,earRinging);
};
// beeeeeeeeeeeeeeeeeeeeeeeeeeeeep
if (isClass (configFile >> "CfgPatches" >> "ACE_Hearing") and _strength > 0) then {
[_x, 0.5 + (_strength / 2)] call EFUNC(hearing,earRinging);
};
// account for people looking away by slightly
// reducing the effect for visual effects.
_posUnit = getPos _x;
_posGrenade = getPos _grenade;
_angleGrenade = ((_posGrenade select 0) - (_posUnit select 0)) atan2 ((_posGrenade select 1) - (_posUnit select 1));
_angleGrenade = (_angleGrenade + 360) % 360;
// account for people looking away by slightly
// reducing the effect for visual effects.
_posUnit = getPos _x;
_posGrenade = getPos _grenade;
_angleGrenade = ((_posGrenade select 0) - (_posUnit select 0)) atan2 ((_posGrenade select 1) - (_posUnit select 1));
_angleGrenade = (_angleGrenade + 360) % 360;
_angleView = (eyeDirection player select 0) atan2 (eyeDirection player select 1);
_angleView = (_angleView + 360) % 360;
_angleView = (eyeDirection ACE_player select 0) atan2 (eyeDirection ACE_player select 1);
_angleView = (_angleView + 360) % 360;
_angleDiff = 180 - abs (abs (_angleGrenade - _angleView) - 180);
_angleDiff = ((_angleDiff - 45) max 0);
_angleDiff = 180 - abs (abs (_angleGrenade - _angleView) - 180);
_angleDiff = ((_angleDiff - 45) max 0);
_strength = _strength - _strength * (_angleDiff / 135);
_strength = _strength - _strength * (_angleDiff / 135);
// create flash to illuminate environment
_light = "#lightpoint" createVehicleLocal getPos _grenade;
_light setLightBrightness 200;
_light setLightAmbient [1,1,1];
_light setLightColor [1,1,1];
_light setLightDayLight true;
// create flash to illuminate environment
_light = "#lightpoint" createVehicleLocal (getPos _grenade);
_light setLightBrightness 200;
_light setLightAmbient [1,1,1];
_light setLightColor [1,1,1];
_light setLightDayLight true;
[FUNC(flashbangEffectStages), 0, [EFFECT_STAGE_DELETELIGHT, (time + (0.1)), _light]] call CBA_fnc_addPerFrameHandler;
//Delete the light after 0.1 seconds
[{
PARAMS_1(_light);
deleteVehicle _light;
}, [_light], 0.1, 0] call EFUNC(common,waitAndExecute);
// blind player
if (_strength > 0.1) then {
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;
// blind player
if (_strength > 0.1) then {
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;
[FUNC(flashbangEffectStages), 0, [EFFECT_STAGE_PARTIALRECOVERY, (time + (7 * _strength)), _strength]] call CBA_fnc_addPerFrameHandler;
[FUNC(flashbangEffectStages), 0, [ EFFECT_STAGE_FULLRECOVERY, (time + (17 * _strength))]] call CBA_fnc_addPerFrameHandler;
};
//PARTIALRECOVERY - start decreasing effect over time
[{
PARAMS_1(_strength);
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength);
}, [_strength], (7 * _strength), 0] call EFUNC(common,waitAndExecute);
//FULLRECOVERY - end effect
[{
GVAR(flashbangPPEffectCC) ppEffectEnable false;
}, [], (17 * _strength), 0] call EFUNC(common,waitAndExecute);
};
};
};
};
} forEach _affected;

View File

@ -1,18 +1,25 @@
//Waits for the grenade fuze to trigger and 'explode'
/*
* Author: commy2
* Waits for the flashbang grenade fuze to trigger and 'explode'
*
* Arguments:
* 0: projectile - Flashbang Grenade <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [theFlashbang] call ace_grenades_fnc_flashbangThrownFuze
*
* Public: No
*/
#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;
PARAMS_1(_projectile);
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];
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
_affected = _projectile nearEntities ["CAManBase", 50];
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
};

View File

@ -1,40 +1,41 @@
/*
* Author: commy2
*
* Select the next throwing mode and display message.
*
* Argument:
* Nothing
*
* Return value:
*
* Arguments:
* Nothing
*
* Return Value:
* Handeled <BOOL>
*
* Example:
* [] call ace_grenades_fnc_nextMode
*
* Public: No
*/
#include "script_component.hpp"
private ["_mode", "_hint"];
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
private ["_mode", "_hint"];
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
if (_mode == 4) then {
_mode = 0;
_mode = 0;
} else {
_mode = _mode + 1;
_mode = _mode + 1;
};
// ROLL GRENADE DOESN'T WORK RIGHT NOW
if (_mode == 3) then {
_mode = 4;
_mode = 4;
};
_hint = [
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"
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 EFUNC(common,displayTextStructured);

View File

@ -1,15 +1,24 @@
/*
* 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.
*
* Arguments:
* 0: unit - Object the event handler is assigned to <OBJECT>
* 1: weapon - Fired weapon <STRING>
* 2: muzzle - Muzzle that was used <STRING>
* 3: mode - Current mode of the fired weapon <STRING>
* 4: ammo - Ammo used <STRING>
* 5: magazine - magazine name which was used <STRING>
* 6: projectile - Object of the projectile that was shot <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [clientFiredBIS-XEH] call ace_grenades_fnc_throwGrenade
*
* Public: No
*/
#include "script_component.hpp"
private ["_unit", "_weapon", "_projectile", "_mode", "_fuzeTime"];
@ -24,38 +33,38 @@ if (_weapon != "Throw") exitWith {};
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
if (_mode != 0) then {
private "_velocity";
private "_velocity";
_velocity = velocity _projectile;
_velocity = velocity _projectile;
switch (_mode) do {
//high throw
case 1 : {
_velocity = [
0.5 * (_velocity select 0),
0.5 * (_velocity select 1),
[0, 0, 0] distance (_velocity vectorMultiply 0.5)
];
switch (_mode) do {
//high throw
case 1 : {
_velocity = [
0.5 * (_velocity select 0),
0.5 * (_velocity select 1),
[0, 0, 0] distance (_velocity vectorMultiply 0.5)
];
};
//precise throw
case 2 : {
_velocity = (_unit weaponDirection _weapon) vectorMultiply (vectorMagnitude _velocity);
};
//roll grande
case 3 : {
//@todo
};
//drop grenade
case 4 : {
_velocity = [0, 0, 0];
};
};
//precise throw
case 2 : {
_velocity = (_unit weaponDirection _weapon) vectorMultiply (vectorMagnitude _velocity);
};
//roll grande
case 3 : {
//@todo
};
//drop grenade
case 4 : {
_velocity = [0, 0, 0];
};
};
_projectile setVelocity _velocity;
_projectile setVelocity _velocity;
};
if (typeOf _projectile == "ACE_G_M84") then {
_fuzeTime = getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "fuseDistance");
// _fuzeTime = getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "explosionTime"); //@toDo pretty sure this should be explosionTime not fuseDistance
[FUNC(flashbangThrownFuze), 0, [_projectile, (time + _fuzeTime)]] call CBA_fnc_addPerFrameHandler;
_fuzeTime = getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "fuseDistance");
// _fuzeTime = getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "explosionTime"); //@toDo pretty sure this should be explosionTime not fuseDistance
[FUNC(flashbangThrownFuze), [_projectile], _fuzeTime, 0] call EFUNC(common,waitAndExecute);
};

View File

@ -1,27 +1,27 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
};
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_post_init));
};
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_post_init));
};
};
class Extended_GetIn_EventHandlers {
class B_Heli_Attack_01_F {
class ADDON {
getIn = QUOTE(call FUNC(onGetin));
};
};
class B_Heli_Attack_01_F {
class ADDON {
getIn = QUOTE(call FUNC(onGetin));
};
};
};
class Extended_GetOut_EventHandlers {
class B_Heli_Attack_01_F {
class ADDON {
getOut = QUOTE(call FUNC(onGetout));
};
};
class B_Heli_Attack_01_F {
class ADDON {
getOut = QUOTE(call FUNC(onGetout));
};
};
};

View File

@ -4,29 +4,29 @@ class RscControlsGroupNoScrollbars;
/* This disables air radar. We need to make this a seperate HUD addon
class RscInGameUI
{
class RscUnitInfo
{
class CA_Radar: RscControlsGroupNoScrollbars
{
class controls
{
class CA_RadarBackground: RscPicture {
colorText[] = {0,0,0,0};
text = "";
};
class CA_RadarIcon: RscPicture {
colorText[] = {0,0,0,0};
};
class CA_Heading: RscText {
colorText[] = {0,0,0,0};
};
};
};
};
class RscUnitInfo
{
class CA_Radar: RscControlsGroupNoScrollbars
{
class controls
{
class CA_RadarBackground: RscPicture {
colorText[] = {0,0,0,0};
text = "";
};
class CA_RadarIcon: RscPicture {
colorText[] = {0,0,0,0};
};
class CA_Heading: RscText {
colorText[] = {0,0,0,0};
};
};
};
};
};
class CfgInGameUI
{
};
*/

View File

@ -1,35 +1,30 @@
class CfgVehicles {
class AllVehicles;
class Air: AllVehicles {
class Turrets;
};
class Helicopter: Air
{
class Turrets: Turrets {
class MainTurret;
};
// TODO: move these to a different HUD addon
// commanderCanSee = 2+32;
// gunnerCanSee = 2+32;
// driverCanSee = 2+32;
class AllVehicles;
class Air: AllVehicles {
class Turrets;
};
};
class Helicopter_Base_F: Helicopter {
class Turrets: Turrets {
class MainTurret: MainTurret {};
};
};
class Heli_Attack_01_base_F: Helicopter_Base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {};
};
};
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
stabilizedInAxes = 4; // This stablizes the turret a bit more for laser designation
};
};
};
};
class Helicopter: Air {
class Turrets {
class MainTurret;
};
// TODO: move these to a different HUD addon
// commanderCanSee = 2+32;
// gunnerCanSee = 2+32;
// driverCanSee = 2+32;
};
class Helicopter_Base_F: Helicopter {};
class Heli_Attack_01_base_F: Helicopter_Base_F {};
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
stabilizedInAxes = 4; // This stablizes the turret a bit more for laser designation
};
};
};
};

View File

@ -1,10 +1,11 @@
class CfgWeapons {
class LauncherCore;
class RocketPods: LauncherCore {
canLock = 1; // Disable locking unless newb mode
};
class missiles_DAGR: RocketPods {
canLock = 1; // Disable locking unless newb mode
};
};
// Disable locking unless newb mode
class LauncherCore;
class RocketPods: LauncherCore {
canLock = 1;
};
class missiles_DAGR: RocketPods {
canLock = 1;
};
};

View File

@ -1,17 +1,17 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "ace_main", "ace_laser" };
version = VERSION;
};
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main", "ace_laser"};
version = VERSION;
};
};
#include "CfgUI.hpp"
#include "CfgEventhandlers.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
#include "CfgVehicles.hpp"

View File

@ -3,7 +3,7 @@ class CfgWeapons {
class ACE_ItemCore;
class ACE_wirecutter: ACE_ItemCore {
author = "$STR_ACE_Core_ACETeam";
author = "$STR_ACE_Common_ACETeam";
displayName = "$STR_ACE_logistics_wirecutter_wirecutterName";
descriptionShort = "$STR_ACE_logistics_wirecutter_wirecutterDescription";
model = "\A3\weapons_F\ammo\mag_univ.p3d";

View File

@ -1,9 +1,4 @@
#define MACRO_ADDMAGAZINE(MAGAZINE,COUNT) class _xx_##MAGAZINE { \
magazine = #MAGAZINE; \
count = COUNT; \
}
class CfgVehicles {
class NATO_Box_Base;
class Box_NATO_Wps_F: NATO_Box_Base {

View File

@ -199,6 +199,22 @@
#define GETEGVAR(var1,var2,var3) GETMVAR(EGVAR(var1,var2),var3)
#define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \
weapon = #WEAPON; \
count = COUNT; \
}
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
}
#define MACRO_ADDMAGAZINE(MAGAZINE,COUNT) class _xx_##MAGAZINE { \
magazine = #MAGAZINE; \
count = COUNT; \
}
#ifdef DISABLE_COMPILE_CACHE
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf))
#else

View File

@ -292,8 +292,8 @@ class CfgVehicles {
displayName = "$STR_ACE_RealisticNames_Heli_Attack_01_Name";
};
class Heli_Light_01_base_F;
class B_Heli_Light_01_F: Heli_Light_01_base_F {
class Heli_Light_01_unarmed_base_F;
class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F {
displayName = "$STR_ACE_RealisticNames_Heli_Light_01_Name";
};
@ -302,7 +302,7 @@ class CfgVehicles {
displayName = "$STR_ACE_RealisticNames_Heli_Light_01_armed_Name";
};
class Heli_Light_01_civil_base_F: Heli_Light_01_base_F {
class Heli_Light_01_civil_base_F: Heli_Light_01_unarmed_base_F {
displayName = "$STR_ACE_RealisticNames_Heli_Light_01_civil_Name";
};

View File

@ -3,7 +3,7 @@ class CfgWeapons {
class ACE_ItemCore;
class ACE_key_master: ACE_ItemCore {
author = "$STR_ACE_Core_ACETeam";
author = "$STR_ACE_Common_ACETeam";
displayName = "Vehicle Key: Master";
descriptionShort = "$STR_ACE_Vehicle_Item_Master_Description";
model = "\A3\weapons_F\ammo\mag_univ.p3d";

View File

@ -8,7 +8,7 @@ class CfgPatches {
requiredAddons[] = {"ACE_common", "ACE_weather"};
versionDesc = "ACE Wind Deflection";
version = VERSION;
author[] = {$STR_ACE_Core_ACETeam, "Glowbal", "Ruthberg"};
author[] = {$STR_ACE_Common_ACETeam, "Glowbal", "Ruthberg"};
authorUrl = "http://csemod.com";
};
};