mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into disarmingTest
This commit is contained in:
commit
e94d7e33dc
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_moduleAmbianceSoundLoop.sqf
|
|
||||||
* @Descr: N/A
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return:
|
|
||||||
* @PublicAPI: false
|
|
||||||
*/
|
|
||||||
|
|
||||||
private ["_logic", "_units", "_activated","_ambianceSounds", "_soundFiles", "_minimalDistance","_maximalDistance", "_minimalDistance", "_maxDelayBetweenSounds", "_allUnits", "_newPos", "_targetUnit", "_soundToPlay", "_soundPath", "_unparsedSounds", "_list", "_splittedList", "_nilCheckPassedList"];
|
|
||||||
_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
|
|
||||||
_units = [_this,1,[],[[]]] call BIS_fnc_param;
|
|
||||||
_activated = [_this,2,true,[true]] call BIS_fnc_param;
|
|
||||||
|
|
||||||
if (_activated && isServer) then {
|
|
||||||
_ambianceSounds = [];
|
|
||||||
_unparsedSounds = _logic getvariable ["soundFiles", ""];
|
|
||||||
_minimalDistance = (_logic getvariable ["minimalDistance", 400]) max 1;
|
|
||||||
_maximalDistance = (_logic getvariable ["maximalDistance", 10]) max _minimalDistance;
|
|
||||||
_minDelayBetweensounds = (_logic getvariable ["minimalDelay", 10]) max 1;
|
|
||||||
_maxDelayBetweenSounds = (_logic getvariable ["maximalDelay", 170]) max _minDelayBetweensounds;
|
|
||||||
_volume = (_logic getvariable ["soundVolume", 30]) max 1;
|
|
||||||
_followPlayers = _logic getvariable ["followPlayers", false];
|
|
||||||
|
|
||||||
_splittedList = [_unparsedSounds, ","] call BIS_fnc_splitString;
|
|
||||||
|
|
||||||
_nilCheckPassedList = "";
|
|
||||||
{
|
|
||||||
_x = [_x] call cse_fnc_string_removeWhiteSpace;
|
|
||||||
_splittedList set [_foreachIndex, _x];
|
|
||||||
}foreach _splittedList;
|
|
||||||
|
|
||||||
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
|
|
||||||
{
|
|
||||||
if (isclass (missionConfigFile >> "CfgSounds" >> _x)) then {
|
|
||||||
_ambianceSounds pushback (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
|
|
||||||
} else {
|
|
||||||
if (isclass (configFile >> "CfgSounds" >> _x)) then {
|
|
||||||
_ambianceSounds pushback ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}foreach _splittedList;
|
|
||||||
|
|
||||||
if (count _ambianceSounds == 0) exitwith {
|
|
||||||
[format["No Ambiance sounds available"]] call cse_fnc_debug;
|
|
||||||
};
|
|
||||||
{
|
|
||||||
if !([".", _x, true] call BIS_fnc_inString) then {
|
|
||||||
[format["Ambiance soundfile does not contain a file extension %1", _x]] call cse_fnc_debug;
|
|
||||||
_ambianceSounds set [_foreachIndex, _x + ".wss"];
|
|
||||||
};
|
|
||||||
}foreach _ambianceSounds;
|
|
||||||
[format["Ambiance sounds %1", _ambianceSounds]] call cse_fnc_debug;
|
|
||||||
|
|
||||||
while {alive _logic} do {
|
|
||||||
_allUnits = switch (true) do {
|
|
||||||
case isMultiplayer: {playableUnits};
|
|
||||||
case isDedicated: {[_logic]};
|
|
||||||
default {[player]};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (count _allUnits > 0) then {
|
|
||||||
_targetUnit = _allUnits select (round(random((count _allUnits)-1)));
|
|
||||||
|
|
||||||
_newPos = (getPos _targetUnit);
|
|
||||||
if (!_followPlayers) then {
|
|
||||||
_newPos = getPos _logic;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (random(1) >= 0.5) then {
|
|
||||||
if (random(1) >= 0.5) then {
|
|
||||||
_newPos set [0, (_newPos select 0) + (_minimalDistance + random(_maximalDistance))];
|
|
||||||
} else {
|
|
||||||
_newPos set [0, (_newPos select 0) - (_minimalDistance + random(_maximalDistance))];
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
if (random(1) >= 0.5) then {
|
|
||||||
_newPos set [1, (_newPos select 1) + (_minimalDistance + random(_maximalDistance))];
|
|
||||||
} else {
|
|
||||||
_newPos set [1, (_newPos select 1) - (_minimalDistance + random(_maximalDistance))];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then {
|
|
||||||
|
|
||||||
_soundToPlay = _ambianceSounds select (round(random((count _ambianceSounds)-1)));
|
|
||||||
playSound3D [_soundToPlay, _targetUnit, false, _newPos, _volume, 1, 1000];
|
|
||||||
|
|
||||||
[format["Played a sound %1", _soundToPlay]] call cse_fnc_debug;
|
|
||||||
|
|
||||||
sleep (_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
true;
|
|
@ -1,302 +1,43 @@
|
|||||||
|
|
||||||
class CfgAmmo {
|
class CfgAmmo {
|
||||||
class BulletBase;
|
// adjust minigun caliber and deflection to other ammo
|
||||||
class B_20mm: BulletBase {
|
|
||||||
deflecting = 3;
|
|
||||||
hit = 100;
|
|
||||||
indirectHit = 10;
|
|
||||||
indirectHitRange = 2;
|
|
||||||
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
|
|
||||||
};
|
|
||||||
|
|
||||||
class SubmunitionBullet;
|
class SubmunitionBullet;
|
||||||
class B_65x39_Minigun_Caseless: SubmunitionBullet {
|
class B_65x39_Minigun_Caseless: SubmunitionBullet {
|
||||||
hit = 10;
|
|
||||||
indirectHit = 0;
|
|
||||||
indirectHitRange = 0;
|
|
||||||
caliber = 1;
|
caliber = 1;
|
||||||
deflecting = 5;
|
deflecting = 15;
|
||||||
typicalSpeed = 850;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class B_762x51_Minigun_Tracer_Red: SubmunitionBullet {
|
class B_762x51_Minigun_Tracer_Red: SubmunitionBullet {
|
||||||
hit = 12;
|
|
||||||
indirectHit = 0;
|
|
||||||
indirectHitRange = 0;
|
|
||||||
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
|
|
||||||
caliber = 1.6;
|
caliber = 1.6;
|
||||||
deflecting = 5;
|
deflecting = 15;
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// also adjust tracer, "muh lightshow"; also adjust splash damage radius
|
||||||
|
class BulletBase;
|
||||||
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
|
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
|
||||||
model = "\A3\Weapons_f\Data\bullettracer\tracer_red.p3d";
|
|
||||||
cost = 20;
|
|
||||||
hit = 80;
|
hit = 80;
|
||||||
indirectHit = 12;
|
indirectHit = 12;
|
||||||
indirectHitRange = 3;
|
indirectHitRange = 3; //2;
|
||||||
caliber = 1.4;
|
caliber = 1.4;
|
||||||
explosive = 0.6;
|
|
||||||
airlock = 1;
|
|
||||||
deflecting = 3;
|
deflecting = 3;
|
||||||
airFriction = -0.00042;
|
|
||||||
typicalSpeed = 960;
|
|
||||||
visibleFire = 32;
|
|
||||||
audibleFire = 32;
|
|
||||||
visibleFireTime = 3;
|
|
||||||
fuseDistance = 3;
|
fuseDistance = 3;
|
||||||
tracerScale = 2.5;
|
|
||||||
tracerStartTime = 0.02;
|
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 {
|
class ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy: Gatling_30mm_HE_Plane_CAS_01_F {
|
||||||
simulation = "shotSubmunitions";
|
simulation = "shotSubmunitions";
|
||||||
triggerTime = 0;
|
triggerTime = 0;
|
||||||
submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub";
|
submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub";
|
||||||
submunitionConeType[] = {"custom", {{0,0}, {0,0}, {0,0}} };
|
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 {
|
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; //40;
|
||||||
hit = 70;
|
indirectHit = 11; //14;
|
||||||
indirectHit = 11;
|
|
||||||
indirectHitRange = 3;
|
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;
|
|
||||||
};
|
};
|
||||||
|
@ -1,202 +1,15 @@
|
|||||||
|
|
||||||
class CfgMagazines {
|
class CfgMagazines {
|
||||||
|
// shoot helper object to tripple rof
|
||||||
class VehicleMagazine;
|
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 {
|
class 1000Rnd_Gatling_30mm_Plane_CAS_01_F: VehicleMagazine {
|
||||||
scope = 2;
|
|
||||||
displayNameShort = "";
|
|
||||||
ammo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy";
|
ammo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy";
|
||||||
count = 1170;
|
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 {
|
class ACE_500Rnd_20mm_shells_Comanche: 300Rnd_20mm_shells {
|
||||||
displayName = "20mm";
|
|
||||||
displayNameShort = "20mm";
|
|
||||||
ammo = "B_20mm";
|
|
||||||
count = 500;
|
count = 500;
|
||||||
deflecting = 3;
|
|
||||||
initSpeed = 1030;
|
|
||||||
maxLeadSpeed = 300;
|
|
||||||
tracersEvery = 5;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -8,12 +8,9 @@ class CfgVehicles {
|
|||||||
class NewTurret {
|
class NewTurret {
|
||||||
class Turrets;
|
class Turrets;
|
||||||
};
|
};
|
||||||
class CargoTurret;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Air: AllVehicles {
|
class Air: AllVehicles {};
|
||||||
class AnimationSources;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Helicopter: Air {
|
class Helicopter: Air {
|
||||||
class Turrets {
|
class Turrets {
|
||||||
@ -33,6 +30,7 @@ class CfgVehicles {
|
|||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class CopilotTurret;
|
class CopilotTurret;
|
||||||
};
|
};
|
||||||
|
class AnimationSources;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Helicopter_Base_H: Helicopter_Base_F {
|
class Helicopter_Base_H: Helicopter_Base_F {
|
||||||
@ -46,7 +44,7 @@ class CfgVehicles {
|
|||||||
lockDetectionSystem = 0;
|
lockDetectionSystem = 0;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
//class MFD {};
|
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class CopilotTurret: CopilotTurret {
|
class CopilotTurret: CopilotTurret {
|
||||||
canEject = 1;
|
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 Turrets: Turrets {
|
||||||
class CopilotTurret: CopilotTurret {};
|
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;
|
lockDetectionSystem = 0;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
//class MFD {};
|
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class CopilotTurret: CopilotTurret {
|
class CopilotTurret: CopilotTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
@ -84,7 +79,8 @@ class CfgVehicles {
|
|||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
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 Turrets: Turrets {
|
||||||
class CopilotTurret: CopilotTurret {
|
class CopilotTurret: CopilotTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
@ -103,36 +99,7 @@ class CfgVehicles {
|
|||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
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 Turrets: Turrets {
|
||||||
class MainTurret: MainTurret {
|
class MainTurret: MainTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
@ -141,6 +108,15 @@ class CfgVehicles {
|
|||||||
magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"};
|
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 {};
|
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {};
|
||||||
@ -149,6 +125,7 @@ class CfgVehicles {
|
|||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
|
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class MainTurret: MainTurret {
|
class MainTurret: MainTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
@ -160,6 +137,7 @@ class CfgVehicles {
|
|||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
|
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class CopilotTurret: CopilotTurret {
|
class CopilotTurret: CopilotTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
@ -174,6 +152,7 @@ class CfgVehicles {
|
|||||||
canEject = 1;
|
canEject = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*class UserActions {
|
/*class UserActions {
|
||||||
class DoorL1_Open {
|
class DoorL1_Open {
|
||||||
available = 1;
|
available = 1;
|
||||||
@ -195,16 +174,14 @@ class CfgVehicles {
|
|||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
//class MFD {};
|
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class CopilotTurret: CopilotTurret {
|
class CopilotTurret: CopilotTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
showHMD = 1;
|
showHMD = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CargoTurret_01: CargoTurret {};
|
|
||||||
class CargoTurret_02: CargoTurret_01 {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*class UserActions: UserActions {
|
/*class UserActions: UserActions {
|
||||||
class DoorL1_Open {
|
class DoorL1_Open {
|
||||||
available = 1;
|
available = 1;
|
||||||
@ -246,9 +223,9 @@ class CfgVehicles {
|
|||||||
lockDetectionSystem = 0;
|
lockDetectionSystem = 0;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
//class MFD {};
|
|
||||||
weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher"};
|
weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher"};
|
||||||
magazines[] = {"5000Rnd_762x51_Yellow_Belt","24Rnd_missiles","168Rnd_CMFlare_Chaff_Magazine"};
|
magazines[] = {"5000Rnd_762x51_Yellow_Belt","24Rnd_missiles","168Rnd_CMFlare_Chaff_Magazine"};
|
||||||
|
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class MainTurret: MainTurret {
|
class MainTurret: MainTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
@ -268,36 +245,37 @@ class CfgVehicles {
|
|||||||
class I_Heli_light_03_F: I_Heli_light_03_base_F {
|
class I_Heli_light_03_F: I_Heli_light_03_base_F {
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class MainTurret: MainTurret {};
|
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 I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {};
|
||||||
//class MFD {};
|
|
||||||
};
|
|
||||||
class I_Heli_light_03_unarmed_F: I_Heli_light_03_unarmed_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 {
|
class Plane_CAS_01_base_F: Plane_Base_F {
|
||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
//class MFD {};
|
|
||||||
class Turrets;
|
class Turrets;
|
||||||
|
|
||||||
#include <flightmodel_thunderbolt.hpp>
|
#include <flightmodel_thunderbolt.hpp>
|
||||||
};
|
};
|
||||||
|
|
||||||
class Plane_CAS_02_base_F: Plane_Base_F {
|
class Plane_CAS_02_base_F: Plane_Base_F {
|
||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
|
|
||||||
class Turrets;
|
class Turrets;
|
||||||
|
|
||||||
#include <flightmodel_yak.hpp>
|
#include <flightmodel_yak.hpp>
|
||||||
};
|
};
|
||||||
|
|
||||||
class Plane_Fighter_03_base_F: Plane_Base_F {
|
class Plane_Fighter_03_base_F: Plane_Base_F {
|
||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
|
|
||||||
class Turrets;
|
class Turrets;
|
||||||
|
|
||||||
#include <flightmodel_alca.hpp>
|
#include <flightmodel_alca.hpp>
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -308,34 +286,34 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class UAV_02_base_F: UAV {
|
class UAV_02_base_F: UAV {
|
||||||
|
weapons[] = {};
|
||||||
|
magazines[] = {};
|
||||||
|
|
||||||
class Turrets {
|
class Turrets {
|
||||||
class MainTurret;
|
class MainTurret;
|
||||||
};
|
};
|
||||||
weapons[] = {};
|
|
||||||
magazines[] = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class UAV_02_CAS_base_F: UAV_02_base_F {
|
class UAV_02_CAS_base_F: UAV_02_base_F {
|
||||||
|
weapons[] = {};
|
||||||
|
magazines[] = {};
|
||||||
|
|
||||||
/*class Turrets: Turrets {
|
/*class Turrets: Turrets {
|
||||||
class MainTurret: MainTurret {};
|
class MainTurret: MainTurret {};
|
||||||
};*/
|
};*/
|
||||||
weapons[] = {};
|
|
||||||
magazines[] = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class B_Heli_Transport_03_base_F: Helicopter_Base_H {
|
class B_Heli_Transport_03_base_F: Helicopter_Base_H {
|
||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
|
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class CopilotTurret: CopilotTurret {
|
class CopilotTurret: CopilotTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
};
|
};
|
||||||
//class MainTurret: MainTurret {};
|
//class MainTurret: MainTurret {};
|
||||||
class RightDoorGun: MainTurret {};
|
class RightDoorGun: MainTurret {};
|
||||||
|
|
||||||
class CargoTurret_01: CargoTurret {};
|
|
||||||
class CargoTurret_02: CargoTurret_01 {};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -346,9 +324,6 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
//class MainTurret: MainTurret {};
|
//class MainTurret: MainTurret {};
|
||||||
//class RightDoorGun: MainTurret {};
|
//class RightDoorGun: MainTurret {};
|
||||||
|
|
||||||
//class CargoTurret_01: CargoTurret {};
|
|
||||||
//class CargoTurret_02: CargoTurret_01 {};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -356,6 +331,7 @@ class CfgVehicles {
|
|||||||
lockDetectionSystem = 12;
|
lockDetectionSystem = 12;
|
||||||
incomingMissileDetectionSystem = 16;
|
incomingMissileDetectionSystem = 16;
|
||||||
driverCanEject = 1;
|
driverCanEject = 1;
|
||||||
|
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class CopilotTurret: CopilotTurret {
|
class CopilotTurret: CopilotTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
@ -374,15 +350,6 @@ class CfgVehicles {
|
|||||||
class LoadmasterTurret: LoadmasterTurret {
|
class LoadmasterTurret: LoadmasterTurret {
|
||||||
canEject = 1;
|
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 {
|
class LoadmasterTurret: LoadmasterTurret {
|
||||||
canEject = 1;
|
canEject = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CargoTurret_01: CargoTurret {};
|
|
||||||
class CargoTurret_02: CargoTurret_01 {};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -4,15 +4,10 @@ class Mode_Burst;
|
|||||||
class Mode_FullAuto;
|
class Mode_FullAuto;
|
||||||
|
|
||||||
class CfgWeapons {
|
class CfgWeapons {
|
||||||
class MGunCore;
|
|
||||||
class MGun: MGunCore {};
|
|
||||||
|
|
||||||
class LMG_RCWS: MGun {};
|
|
||||||
|
|
||||||
// Manual Switching Of Flare Mode
|
// Manual Switching Of Flare Mode
|
||||||
class SmokeLauncher;
|
class SmokeLauncher;
|
||||||
class CMFlareLauncher: SmokeLauncher {
|
class CMFlareLauncher: SmokeLauncher {
|
||||||
modes[] = {"Single", "Burst", "AIBurst"};
|
modes[] = {"Single","Burst","AIBurst"};
|
||||||
class Single: Mode_SemiAuto {
|
class Single: Mode_SemiAuto {
|
||||||
reloadTime = 0.1;
|
reloadTime = 0.1;
|
||||||
};
|
};
|
||||||
@ -21,13 +16,15 @@ class CfgWeapons {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// bigger mag for comanche
|
||||||
class CannonCore;
|
class CannonCore;
|
||||||
class gatling_20mm: 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 {
|
class manual: CannonCore {
|
||||||
reloadTime = 0.023;
|
reloadTime = 0.023; //0.04;
|
||||||
dispersion = 0.006;
|
dispersion = 0.006; //0.0022;
|
||||||
};
|
};
|
||||||
class close: manual {};
|
class close: manual {};
|
||||||
class short: close {};
|
class short: close {};
|
||||||
@ -36,21 +33,14 @@ class CfgWeapons {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class ACE_gatling_20mm_Comanche: gatling_20mm {
|
class ACE_gatling_20mm_Comanche: gatling_20mm {
|
||||||
displayName = "XM301";
|
displayName = "$STR_ACE_Aircraft_gatling_20mm_Name";
|
||||||
class close: close {
|
|
||||||
reloadTime = 0.04;
|
|
||||||
dispersion = 0.0022;
|
|
||||||
};
|
|
||||||
class far: far {
|
|
||||||
reloadTime = 0.04;
|
|
||||||
dispersion = 0.0022;
|
|
||||||
};
|
|
||||||
class manual: manual {
|
class manual: manual {
|
||||||
reloadTime = 0.04;
|
reloadTime = 0.04;
|
||||||
dispersion = 0.0022;
|
dispersion = 0.0022;
|
||||||
displayName = "XM301";
|
displayName = "$STR_ACE_Aircraft_gatling_20mm_Name";
|
||||||
};
|
};
|
||||||
class medium: medium {
|
class close: close {
|
||||||
reloadTime = 0.04;
|
reloadTime = 0.04;
|
||||||
dispersion = 0.0022;
|
dispersion = 0.0022;
|
||||||
};
|
};
|
||||||
@ -58,38 +48,53 @@ class CfgWeapons {
|
|||||||
reloadTime = 0.04;
|
reloadTime = 0.04;
|
||||||
dispersion = 0.0022;
|
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 {
|
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 {
|
class manual: MGun {
|
||||||
reloadTime = 0.015;
|
reloadTime = 0.075; //0.015;
|
||||||
dispersion = 0.006;
|
dispersion = 0.00093; //0.006;
|
||||||
};
|
};
|
||||||
class close: manual {};
|
class close: manual {};
|
||||||
class short: close {};
|
class short: close {};
|
||||||
class medium: close {};
|
class medium: close {};
|
||||||
class far: close {};
|
class far: close {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class LMG_Minigun_heli: LMG_Minigun {
|
class LMG_Minigun_heli: LMG_Minigun {
|
||||||
showAimCursorInternal = 0;
|
showAimCursorInternal = 0;
|
||||||
class manual: manual {
|
class manual: manual {
|
||||||
reloadTime = 0.015;
|
reloadTime = 0.015; //0.033; Note: This is a way to fast ROF (requires over 60 FPS) @todo
|
||||||
dispersion = 0.006;
|
dispersion = 0.006; //0.0087;
|
||||||
};
|
};
|
||||||
class close: manual {};
|
class close: manual {};
|
||||||
class short: close {};
|
class short: close {};
|
||||||
class medium: close {};
|
class medium: close {};
|
||||||
class far: close {};
|
class far: close {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class M134_minigun: MGunCore {
|
class M134_minigun: MGunCore {
|
||||||
class LowROF: Mode_FullAuto {
|
class LowROF: Mode_FullAuto {
|
||||||
reloadTime = 0.015;
|
reloadTime = 0.015; //0.03; same as above @todo
|
||||||
dispersion = 0.006;
|
dispersion = 0.006; //0.0023;
|
||||||
};
|
};
|
||||||
class HighROF: LowROF {
|
class HighROF: LowROF {
|
||||||
reloadTime = 0.015;
|
reloadTime = 0.015; //0.03;
|
||||||
dispersion = 0.006;
|
dispersion = 0.006; //0.0023;
|
||||||
};
|
};
|
||||||
class close: HighROF {};
|
class close: HighROF {};
|
||||||
class short: close {};
|
class short: close {};
|
||||||
@ -100,19 +105,10 @@ class CfgWeapons {
|
|||||||
class Gatling_30mm_Plane_CAS_01_F: CannonCore {
|
class Gatling_30mm_Plane_CAS_01_F: CannonCore {
|
||||||
autoFire = 1;
|
autoFire = 1;
|
||||||
burst = 1;
|
burst = 1;
|
||||||
reloadTime = 0.0154;
|
|
||||||
class LowROF: Mode_FullAuto {
|
class LowROF: Mode_FullAuto {
|
||||||
autoFire = 0;
|
autoFire = 0;
|
||||||
//burst = 65;
|
burst = 22; //65;
|
||||||
burst = 22;
|
reloadTime = 0.0462; //0.0154; //0.034;
|
||||||
//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";
|
|
||||||
multiplier = 3;
|
multiplier = 3;
|
||||||
};
|
};
|
||||||
class close: LowROF {};
|
class close: LowROF {};
|
||||||
@ -121,120 +117,4 @@ class CfgWeapons {
|
|||||||
class medium: close {};
|
class medium: close {};
|
||||||
class far: 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 {};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,7 @@ class CfgPatches {
|
|||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_common"};
|
requiredAddons[] = {"ace_common"};
|
||||||
author[] = {"KoffeinFlummi","Crusty"};
|
author[] = {"KoffeinFlummi","Crusty","commy2"};
|
||||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,18 @@
|
|||||||
<Portuguese>Rajada</Portuguese>
|
<Portuguese>Rajada</Portuguese>
|
||||||
<Italian>Raffica</Italian>
|
<Italian>Raffica</Italian>
|
||||||
</Key>
|
</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">
|
<Key ID="STR_ACE_Aircraft_OpenCargoRamp">
|
||||||
<English>Open Cargo Door</English>
|
<English>Open Cargo Door</English>
|
||||||
<German>Laderampe öffnen</German>
|
<German>Laderampe öffnen</German>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
class Extended_PreInit_EventHandlers {
|
class Extended_PreInit_EventHandlers {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -1,8 +1,10 @@
|
|||||||
|
|
||||||
class CfgMagazines {
|
class CfgMagazines {
|
||||||
class CA_Magazine;
|
class CA_Magazine;
|
||||||
class B_IR_Grenade: CA_Magazine {
|
class B_IR_Grenade: CA_Magazine {
|
||||||
ACE_Attachable = 1;
|
ACE_Attachable = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SmokeShell;
|
class SmokeShell;
|
||||||
class Chemlight_green: SmokeShell {
|
class Chemlight_green: SmokeShell {
|
||||||
ACE_Attachable = 1;
|
ACE_Attachable = 1;
|
||||||
|
@ -1,29 +1,30 @@
|
|||||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
|
||||||
name = #ITEM; \
|
|
||||||
count = COUNT; \
|
|
||||||
};
|
|
||||||
|
|
||||||
#define MACRO_ATTACHTOVEHICLE \
|
#define MACRO_ATTACHTOVEHICLE \
|
||||||
class ACE_Actions { \
|
class ACE_Actions { \
|
||||||
class GVAR(AttachVehicle) { \
|
class ACE_MainActions { \
|
||||||
displayName = "$STR_ACE_Attach_AttachDetach"; \
|
selection = ""; \
|
||||||
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
|
distance = 5; \
|
||||||
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
|
condition = "true"; \
|
||||||
exceptions[] = {"ACE_Drag_isNotDragging"}; \
|
class GVAR(AttachVehicle) { \
|
||||||
showDisabled = 0; \
|
displayName = "$STR_ACE_Attach_AttachDetach"; \
|
||||||
priority = 0; \
|
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
|
||||||
icon = PATHTOF(UI\attach_ca.paa); \
|
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
|
||||||
distance = 4; \
|
exceptions[] = {"ACE_Drag_isNotDragging"}; \
|
||||||
}; \
|
showDisabled = 0; \
|
||||||
class GVAR(DetachVehicle) { \
|
priority = 0; \
|
||||||
displayName = "$STR_ACE_Attach_Detach"; \
|
icon = PATHTOF(UI\attach_ca.paa); \
|
||||||
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
|
distance = 4; \
|
||||||
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
|
}; \
|
||||||
exceptions[] = {"ACE_Drag_isNotDragging"}; \
|
class GVAR(DetachVehicle) { \
|
||||||
showDisabled = 0; \
|
displayName = "$STR_ACE_Attach_Detach"; \
|
||||||
priority = 0; \
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
|
||||||
icon = PATHTOF(UI\detach_ca.paa); \
|
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
|
||||||
distance = 4; \
|
exceptions[] = {"ACE_Drag_isNotDragging"}; \
|
||||||
|
showDisabled = 0; \
|
||||||
|
priority = 0; \
|
||||||
|
icon = PATHTOF(UI\detach_ca.paa); \
|
||||||
|
distance = 4; \
|
||||||
|
}; \
|
||||||
}; \
|
}; \
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -32,16 +33,20 @@ class CfgVehicles {
|
|||||||
class Car: LandVehicle {
|
class Car: LandVehicle {
|
||||||
MACRO_ATTACHTOVEHICLE
|
MACRO_ATTACHTOVEHICLE
|
||||||
};
|
};
|
||||||
|
|
||||||
class Tank: LandVehicle {
|
class Tank: LandVehicle {
|
||||||
MACRO_ATTACHTOVEHICLE
|
MACRO_ATTACHTOVEHICLE
|
||||||
};
|
};
|
||||||
|
|
||||||
class Air;
|
class Air;
|
||||||
class Helicopter: Air {
|
class Helicopter: Air {
|
||||||
MACRO_ATTACHTOVEHICLE
|
MACRO_ATTACHTOVEHICLE
|
||||||
};
|
};
|
||||||
|
|
||||||
class Plane: Air {
|
class Plane: Air {
|
||||||
MACRO_ATTACHTOVEHICLE
|
MACRO_ATTACHTOVEHICLE
|
||||||
};
|
};
|
||||||
|
|
||||||
class Ship;
|
class Ship;
|
||||||
class Ship_F: Ship {
|
class Ship_F: Ship {
|
||||||
MACRO_ATTACHTOVEHICLE
|
MACRO_ATTACHTOVEHICLE
|
||||||
@ -83,19 +88,22 @@ class CfgVehicles {
|
|||||||
simulation = "nvmarker";
|
simulation = "nvmarker";
|
||||||
|
|
||||||
class NVGMarker {
|
class NVGMarker {
|
||||||
diffuse[] = {0,0,0};
|
diffuse[] = {0.006, 0.006, 0.006, 1};
|
||||||
ambient[] = {0,0,0};
|
ambient[] = {0.005, 0.005, 0.005, 1};
|
||||||
brightness = 0.004;
|
brightness = 0.2;
|
||||||
name = "pozicni blik";
|
name = "pozicni blik";
|
||||||
drawLight = 1;
|
drawLightSize = 0.2;
|
||||||
drawLightSize = 0.005;
|
|
||||||
drawLightCenterSize = 0.003;
|
drawLightCenterSize = 0.003;
|
||||||
activeLight = 0;
|
activeLight = 0;
|
||||||
blinking=1;
|
blinking=1;
|
||||||
|
blinkingStartsOn=1;
|
||||||
|
blinkingPattern[] = {2,2};
|
||||||
|
blinkingPatternGuarantee = false;
|
||||||
dayLight = 0;
|
dayLight = 0;
|
||||||
onlyInNvg = 1;
|
onlyInNvg = 1;
|
||||||
useFlare = 0;
|
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
|
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;
|
accuracy = 1000;
|
||||||
cost = 0;
|
cost = 0;
|
||||||
@ -111,37 +119,36 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class NATO_Box_Base;
|
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 Box_NATO_Support_F: NATO_Box_Base {
|
||||||
class TransportItems {
|
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 Box_East_Support_F: EAST_Box_Base {
|
||||||
class TransportItems {
|
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 Box_IND_Support_F: IND_Box_Base {
|
||||||
class TransportItems {
|
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 Box_FIA_Support_F: FIA_Box_Base_F {
|
||||||
class TransportItems {
|
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 ACE_Box_Misc: Box_NATO_Support_F {
|
||||||
class TransportItems {
|
class TransportItems {
|
||||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
|
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -1,14 +1,17 @@
|
|||||||
|
|
||||||
class CfgWeapons {
|
class CfgWeapons {
|
||||||
class ACE_ItemCore;
|
class ACE_ItemCore;
|
||||||
class InventoryItem_Base_F;
|
class InventoryItem_Base_F;
|
||||||
|
|
||||||
class ACE_IR_Strobe_Item: ACE_ItemCore {
|
class ACE_IR_Strobe_Item: ACE_ItemCore {
|
||||||
|
ACE_attachable = 1;
|
||||||
|
author = "$STR_ACE_Common_ACETeam";
|
||||||
|
scope = 2;
|
||||||
displayName = "$STR_ACE_IrStrobe_Name";
|
displayName = "$STR_ACE_IrStrobe_Name";
|
||||||
descriptionShort = "$STR_ACE_IrStrobe_Description";
|
descriptionShort = "$STR_ACE_IrStrobe_Description";
|
||||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||||
picture = PATHTOF(UI\irstrobe_item.paa);
|
picture = PATHTOF(UI\irstrobe_item.paa);
|
||||||
scope = 2;
|
|
||||||
ACE_attachable = 1;
|
|
||||||
class ItemInfo: InventoryItem_Base_F {
|
class ItemInfo: InventoryItem_Base_F {
|
||||||
mass = 1;
|
mass = 1;
|
||||||
};
|
};
|
||||||
|
@ -5,17 +5,14 @@ class CfgPatches {
|
|||||||
units[] = {};
|
units[] = {};
|
||||||
weapons[] = {"ACE_IR_Strobe_Item"};
|
weapons[] = {"ACE_IR_Strobe_Item"};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
requiredAddons[] = {"ace_interaction"};
|
||||||
author[] = {"KoffeinFlummi", "eRazeri", "CAA-Picard"};
|
author[] = {"KoffeinFlummi","eRazeri","CAA-Picard"};
|
||||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
|
|
||||||
#include "CfgVehicles.hpp"
|
|
||||||
|
|
||||||
#include "CfgWeapons.hpp"
|
|
||||||
|
|
||||||
#include "CfgMagazines.hpp"
|
#include "CfgMagazines.hpp"
|
||||||
|
#include "CfgVehicles.hpp"
|
||||||
|
#include "CfgWeapons.hpp"
|
||||||
|
@ -20,31 +20,33 @@
|
|||||||
PARAMS_3(_unit,_attachToVehicle,_itemName);
|
PARAMS_3(_unit,_attachToVehicle,_itemName);
|
||||||
|
|
||||||
//Sanity Check (_unit has item in inventory, not over attach limit)
|
//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 = "";
|
_itemVehClass = "";
|
||||||
_onAtachText = "";
|
_onAtachText = "";
|
||||||
|
_selfAttachPosition = [_unit, [-0.05, 0, 0.12], "rightshoulder"];
|
||||||
|
|
||||||
switch true do {
|
switch (true) do {
|
||||||
case (_itemName == "ACE_IR_Strobe_Item"): {
|
case (_itemName == "ACE_IR_Strobe_Item"): {
|
||||||
_itemVehClass = "ACE_IR_Strobe_Effect";
|
_itemVehClass = "ACE_IR_Strobe_Effect";
|
||||||
_onAtachText = localize "STR_ACE_Attach_IrStrobe_Attached";
|
_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";
|
_itemVehClass = "B_IRStrobe";
|
||||||
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
|
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
|
||||||
};
|
};
|
||||||
case (_itemName == "O_IR_Grenade"): {
|
case (_itemName == "O_IR_Grenade"): {
|
||||||
_itemVehClass = "O_IRStrobe";
|
_itemVehClass = "O_IRStrobe";
|
||||||
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
|
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
|
||||||
};
|
};
|
||||||
case (_itemName == "I_IR_Grenade"): {
|
case (_itemName == "I_IR_Grenade"): {
|
||||||
_itemVehClass = "I_IRStrobe";
|
_itemVehClass = "I_IRStrobe";
|
||||||
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
|
_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;
|
_itemVehClass = _itemName;
|
||||||
_onAtachText = localize "STR_ACE_Attach_Chemlight_Attached";
|
_onAtachText = localize "STR_ACE_Attach_Chemlight_Attached";
|
||||||
};
|
};
|
||||||
@ -57,8 +59,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
|||||||
_attachedItem = _itemVehClass createVehicle [0,0,0];
|
_attachedItem = _itemVehClass createVehicle [0,0,0];
|
||||||
_attachedItem attachTo _selfAttachPosition;
|
_attachedItem attachTo _selfAttachPosition;
|
||||||
[_onAtachText] call EFUNC(common,displayTextStructured);
|
[_onAtachText] call EFUNC(common,displayTextStructured);
|
||||||
_attachToVehicle setVariable ["ACE_AttachedObjects", [_attachedItem], true];
|
_attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true];
|
||||||
_attachToVehicle setVariable ["ACE_AttachedItemNames", [_itemName], true];
|
_attachToVehicle setVariable [QGVAR(ItemNames), [_itemName], true];
|
||||||
} else {
|
} else {
|
||||||
GVAR(setupObject) = _itemVehClass createVehicleLocal [0,0,-10000];
|
GVAR(setupObject) = _itemVehClass createVehicleLocal [0,0,-10000];
|
||||||
GVAR(setupObject) enableSimulationGlobal false;
|
GVAR(setupObject) enableSimulationGlobal false;
|
||||||
@ -72,17 +74,17 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
|||||||
private "_player";
|
private "_player";
|
||||||
_player = ACE_player;
|
_player = ACE_player;
|
||||||
//Stop if player switch or player gets to far from vehicle
|
//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);
|
call FUNC(placeCancel);
|
||||||
};
|
};
|
||||||
GVAR(pfeh_running) = true;
|
GVAR(pfeh_running) = true;
|
||||||
_pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]);
|
_pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]);
|
||||||
GVAR(setupObject) setPosATL _pos;
|
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
|
//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);
|
[{[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(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) AND !isNull (GVAR(setupObject))}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
|
_unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
|
||||||
};
|
};
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
PARAMS_3(_unit,_attachToVehicle,_item);
|
PARAMS_3(_unit,_attachToVehicle,_item);
|
||||||
|
|
||||||
_attachLimit = if (_unit == _attachToVehicle) then {1} else {10};
|
private ["_attachLimit", "_attachedObjects"];
|
||||||
_attachedObjects = _attachToVehicle getVariable ["ACE_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 + [""])}
|
||||||
|
@ -16,24 +16,25 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_attachedObjects", "_inRange", "_unitPos", "_objectPos"];
|
|
||||||
|
|
||||||
PARAMS_2(_unit,_attachToVehicle);
|
PARAMS_2(_unit,_attachToVehicle);
|
||||||
|
|
||||||
_attachedObjects = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
|
private ["_attachedObjects", "_inRange"];
|
||||||
|
|
||||||
|
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||||
|
|
||||||
_inRange = false;
|
_inRange = false;
|
||||||
if (_unit == _attachToVehicle) then {
|
if (_unit == _attachToVehicle) then {
|
||||||
_inRange = (count _attachedObjects) > 0;
|
_inRange = count _attachedObjects > 0;
|
||||||
} else {
|
} else {
|
||||||
//Scan if unit is within range (using 2d distance)
|
//Scan if unit is within range (using 2d distance)
|
||||||
|
private ["_unitPos", "_objectPos"];
|
||||||
_unitPos = getPos _unit;
|
_unitPos = getPos _unit;
|
||||||
_unitPos set [2,0];
|
_unitPos set [2,0];
|
||||||
{
|
{
|
||||||
_objectPos = getPos _x;
|
_objectPos = getPos _x;
|
||||||
_objectPos set [2, 0];
|
_objectPos set [2, 0];
|
||||||
if ((_objectPos distance _unitPos) < 4) exitWith {_inRange = true};
|
if (_objectPos distance _unitPos < 4) exitWith {_inRange = true};
|
||||||
} forEach _attachedObjects;
|
} forEach _attachedObjects;
|
||||||
};
|
};
|
||||||
|
|
||||||
(canStand _unit) && _inRange && {alive _attachToVehicle}
|
canStand _unit && {_inRange} && {alive _attachToVehicle}
|
||||||
|
@ -16,12 +16,14 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_itemName", "_count", "_attachedItem", "_fnc_detachDelay"];
|
|
||||||
|
|
||||||
PARAMS_2(_unit,_attachToVehicle);
|
PARAMS_2(_unit,_attachToVehicle);
|
||||||
|
|
||||||
_attachedObjectsArray = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
|
private ["_attachedObjects", "_attachedItems"];
|
||||||
_attachedItemsArray = _attachToVehicle getVariable ["ACE_AttachedItemNames", []];
|
|
||||||
|
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||||
|
_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];
|
||||||
|
|
||||||
|
private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"];
|
||||||
|
|
||||||
_attachedObject = objNull;
|
_attachedObject = objNull;
|
||||||
_attachedIndex = -1;
|
_attachedIndex = -1;
|
||||||
@ -34,53 +36,51 @@ _unitPos set [2,0];
|
|||||||
{
|
{
|
||||||
_objectPos = getPos _x;
|
_objectPos = getPos _x;
|
||||||
_objectPos set [2, 0];
|
_objectPos set [2, 0];
|
||||||
if ((_objectPos distance _unitPos) < _minDistance) then {
|
if (_objectPos distance _unitPos < _minDistance) then {
|
||||||
_minDistance = (_objectPos distance _unitPos);
|
_minDistance = _objectPos distance _unitPos;
|
||||||
_attachedObject = _x;
|
_attachedObject = _x;
|
||||||
_itemName = _attachedItemsArray select _forEachIndex;
|
_itemName = _attachedItems select _forEachIndex;
|
||||||
_attachedIndex = _forEachIndex;
|
_attachedIndex = _forEachIndex;
|
||||||
};
|
};
|
||||||
} forEach _attachedObjectsArray;
|
} forEach _attachedObjects;
|
||||||
|
|
||||||
// Check if unit has an attached item
|
// 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
|
// Exit if can't add the item
|
||||||
_count = (count items _unit) + (count magazines _unit);
|
if !(_unit canAdd _itemName) exitWith {
|
||||||
_unit addItem _itemName;
|
|
||||||
if ((count items _unit) + (count magazines _unit) <= _count) exitWith {
|
|
||||||
[localize "STR_ACE_Attach_Inventory_Full"] call EFUNC(common,displayTextStructured);
|
[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
|
// Hack for dealing with X_IR_Grenade effect not dissapearing on deleteVehicle
|
||||||
detach _attachedObject;
|
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
|
// Delete attached item after 0.5 seconds
|
||||||
_fnc_detachDelay = {
|
[{deleteVehicle (_this select 0)}, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||||
deleteVehicle (_this select 0);
|
|
||||||
};
|
|
||||||
[_fnc_detachDelay, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute);
|
|
||||||
} else {
|
} else {
|
||||||
// Delete attached item
|
// Delete attached item
|
||||||
deleteVehicle _attachedObject;
|
deleteVehicle _attachedObject;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset unit variables
|
// Reset unit variables
|
||||||
_attachedObjectsArray deleteAt _attachedIndex;
|
_attachedObjects deleteAt _attachedIndex;
|
||||||
_attachedItemsArray deleteAt _attachedIndex;
|
_attachedItems deleteAt _attachedIndex;
|
||||||
_attachToVehicle setVariable ["ACE_AttachedObjects", _attachedObjectsArray, true];
|
_attachToVehicle setVariable [QGVAR(Objects), _attachedObjects, true];
|
||||||
_attachToVehicle setVariable ["ACE_AttachedItemNames", _attachedItemsArray, true];
|
_attachToVehicle setVariable [QGVAR(ItemNames), _attachedItems, true];
|
||||||
|
|
||||||
// Display message
|
// Display message
|
||||||
switch true do {
|
switch (true) do {
|
||||||
case (_itemName == "ACE_IR_Strobe_Item") : {
|
case (_itemName == "ACE_IR_Strobe_Item") : {
|
||||||
[localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
|
[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);
|
[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);
|
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -55,13 +55,13 @@ _attachables = items _unit;
|
|||||||
} forEach _attachables;
|
} forEach _attachables;
|
||||||
|
|
||||||
[
|
[
|
||||||
_actions,
|
_actions,
|
||||||
{
|
{
|
||||||
[ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
|
[ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
|
||||||
call EFUNC(interaction,hideMenu);
|
call EFUNC(interaction,hideMenu);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
call EFUNC(interaction,hideMenu);
|
call EFUNC(interaction,hideMenu);
|
||||||
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
|
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
|
||||||
}
|
}
|
||||||
] call EFUNC(interaction,openSelectMenu);
|
] call EFUNC(interaction,openSelectMenu);
|
||||||
|
@ -100,11 +100,11 @@ _attachedObject attachTo [_attachToVehicle, _endPosTestOffset];
|
|||||||
_placer removeItem _itemClassname;
|
_placer removeItem _itemClassname;
|
||||||
|
|
||||||
//Add Object to ACE_AttachedObjects and ACE_AttachedItemNames
|
//Add Object to ACE_AttachedObjects and ACE_AttachedItemNames
|
||||||
_currentObjects = _attachToVehicle getVariable ["ACE_AttachedObjects", []];
|
_currentObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||||
_currentObjects pushBack _attachedObject;
|
_currentObjects pushBack _attachedObject;
|
||||||
_attachToVehicle setVariable ["ACE_AttachedObjects", _currentObjects, true];
|
_attachToVehicle setVariable [QGVAR(Objects), _currentObjects, true];
|
||||||
_currentItemNames = _attachToVehicle getVariable ["ACE_AttachedItemNames", []];
|
_currentItemNames = _attachToVehicle getVariable [QGVAR(ItemNames), []];
|
||||||
_currentItemNames pushBack _itemClassname;
|
_currentItemNames pushBack _itemClassname;
|
||||||
_attachToVehicle setVariable ["ACE_AttachedItemNames", _currentItemNames, true];
|
_attachToVehicle setVariable [QGVAR(ItemNames), _currentItemNames, true];
|
||||||
|
|
||||||
[_placementText] call EFUNC(common,displayTextStructured);
|
[_placementText] call EFUNC(common,displayTextStructured);
|
||||||
|
@ -1 +0,0 @@
|
|||||||
z\ace\addons\backblast
|
|
@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
class Extended_PreInit_EventHandlers {
|
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
class Extended_FiredNear_EventHandlers {
|
|
||||||
class CAManBase {
|
|
||||||
class GVAR(LauncherBackblast) {
|
|
||||||
FiredNear = QUOTE( if (local (_this select 0) && {getNumber (configfile >> 'CfgWeapons' >> _this select 3 >> 'ACE_Backblast_Damage') > 0}) then {_this call FUNC(launcherBackblast)} );
|
|
||||||
};
|
|
||||||
class GVAR(TankDangerZone) {
|
|
||||||
FiredNear = QUOTE( if (local (_this select 0) && {getNumber (configfile >> 'CfgWeapons' >> _this select 3 >> 'ACE_DangerZone_Damage') > 0}) then {_this call FUNC(tankDangerZone)} );
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,44 +0,0 @@
|
|||||||
class CfgWeapons {
|
|
||||||
|
|
||||||
class LauncherCore;
|
|
||||||
class Launcher: LauncherCore {
|
|
||||||
ACE_Backblast_Angle = 60;
|
|
||||||
ACE_Backblast_Range = 10;
|
|
||||||
ACE_Backblast_Damage = 0.7;
|
|
||||||
};
|
|
||||||
class Launcher_Base_F: Launcher {};
|
|
||||||
|
|
||||||
class launch_Titan_base: Launcher_Base_F {
|
|
||||||
ACE_Backblast_Angle = 40;
|
|
||||||
ACE_Backblast_Range = 8;
|
|
||||||
ACE_Backblast_Damage = 0.5;
|
|
||||||
};
|
|
||||||
class launch_Titan_short_base: launch_Titan_base {
|
|
||||||
ACE_Backblast_Angle = 40;
|
|
||||||
ACE_Backblast_Range = 8;
|
|
||||||
ACE_Backblast_Damage = 0.5;
|
|
||||||
};
|
|
||||||
|
|
||||||
class launch_NLAW_F: Launcher_Base_F {
|
|
||||||
ACE_Backblast_Angle = 40;
|
|
||||||
ACE_Backblast_Range = 5;
|
|
||||||
ACE_Backblast_Damage = 0.6;
|
|
||||||
};
|
|
||||||
class launch_RPG32_F: Launcher_Base_F {
|
|
||||||
ACE_Backblast_Angle = 60;
|
|
||||||
ACE_Backblast_Range = 15;
|
|
||||||
ACE_Backblast_Damage = 0.7;
|
|
||||||
};
|
|
||||||
|
|
||||||
class CannonCore;
|
|
||||||
class cannon_120mm: CannonCore {
|
|
||||||
ACE_DangerZone_Angle = 90;
|
|
||||||
ACE_DangerZone_Range = 50;
|
|
||||||
ACE_DangerZone_Damage = 0.85;
|
|
||||||
};
|
|
||||||
class mortar_155mm_AMOS: CannonCore {
|
|
||||||
ACE_DangerZone_Angle = 90;
|
|
||||||
ACE_DangerZone_Range = 60;
|
|
||||||
ACE_DangerZone_Damage = 1;
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,31 +0,0 @@
|
|||||||
// by commy2
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private ["_position", "_direction", "_maxDistance", "_distance", "_iteration", "_laser", "_line"];
|
|
||||||
|
|
||||||
_position = + _this select 0;
|
|
||||||
_direction = + _this select 1;
|
|
||||||
_maxDistance = _this select 2;
|
|
||||||
|
|
||||||
_distance = _maxDistance;
|
|
||||||
_iteration = _distance;
|
|
||||||
_laser = [];
|
|
||||||
_line = [_position, _laser];
|
|
||||||
|
|
||||||
while {
|
|
||||||
_iteration > 0.1
|
|
||||||
} do {
|
|
||||||
_iteration = _iteration / 2;
|
|
||||||
|
|
||||||
_laser set [0, (_position select 0) - _distance * (_direction select 0)];
|
|
||||||
_laser set [1, (_position select 1) - _distance * (_direction select 1)];
|
|
||||||
_laser set [2, (_position select 2) - _distance * (_direction select 2)];
|
|
||||||
|
|
||||||
_intersections = {
|
|
||||||
_x isKindOf "Static" || {_x isKindOf "AllVehicles"}
|
|
||||||
} count (lineIntersectsWith _line);
|
|
||||||
|
|
||||||
_distance = _distance + ([1, -1] select (_intersections > 0)) * _iteration;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_distance > _maxDistance) then {999} else {_distance}
|
|
@ -1,72 +0,0 @@
|
|||||||
// by commy2
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
_unit = _this select 0;
|
|
||||||
_firer = _this select 1;
|
|
||||||
_distance = _this select 2;
|
|
||||||
_weapon = _this select 3;
|
|
||||||
|
|
||||||
if (vehicle _unit != _unit || {!([_firer] call EFUNC(common,isPlayer))}) exitWith {};
|
|
||||||
|
|
||||||
_backblastAngle = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Angle") / 2;
|
|
||||||
_backblastRange = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Range");
|
|
||||||
_backblastDamage = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Damage");
|
|
||||||
|
|
||||||
_position = eyePos _firer;
|
|
||||||
_direction = _firer weaponDirection currentWeapon _firer;
|
|
||||||
|
|
||||||
if (_unit == _firer) then {
|
|
||||||
_distance = [_position, _direction, _backblastRange] call FUNC(getDistance);
|
|
||||||
hint format ["%1", _distance];
|
|
||||||
if (_distance < _backblastRange) then {
|
|
||||||
_alpha = sqrt (1 - _distance / _backblastRange);
|
|
||||||
_beta = sqrt 0.5;
|
|
||||||
|
|
||||||
_damage = 2 * _alpha * _beta * _backblastDamage;
|
|
||||||
[_damage * 100] call BIS_fnc_bloodEffect;
|
|
||||||
|
|
||||||
// TODO: Sort this interaction with medical
|
|
||||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
|
||||||
[_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
|
||||||
} else {
|
|
||||||
_unit setDamage (damage _unit + _damage);
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_direction = [0, 0, 0] vectorDiff _direction;
|
|
||||||
|
|
||||||
_azimuth = (_direction select 0) atan2 (_direction select 1);
|
|
||||||
_inclination = asin (_direction select 2);
|
|
||||||
|
|
||||||
_relativePosition = eyePos _unit;
|
|
||||||
_relativeDirection = _relativePosition vectorDiff _position;
|
|
||||||
|
|
||||||
_relativeAzimuth = (_relativeDirection select 0) atan2 (_relativeDirection select 1);
|
|
||||||
_relativeInclination = asin (_relativeDirection select 2);
|
|
||||||
|
|
||||||
_angle = sqrt ((_relativeAzimuth - _azimuth) ^ 2 + (_relativeInclination - _inclination) ^ 2);
|
|
||||||
_distance = vectorMagnitude _relativeDirection;
|
|
||||||
|
|
||||||
_line = [_position, _relativePosition];
|
|
||||||
|
|
||||||
if (_angle < _backblastAngle && {_distance < _backblastRange} && {!lineIntersects _line} && {!terrainIntersectASL _line}) then {
|
|
||||||
_alpha = sqrt (1 - _distance / _backblastRange);
|
|
||||||
_beta = sqrt (1 - _angle / _backblastAngle);
|
|
||||||
|
|
||||||
_damage = 2 * _alpha * _beta * _backblastDamage;
|
|
||||||
if (_unit == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
|
|
||||||
|
|
||||||
// TODO: Sort this interaction with medical
|
|
||||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
|
||||||
[_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
|
||||||
_unit spawn {
|
|
||||||
sleep 0.5;
|
|
||||||
[_this, "", 0, objNull, objNull] call EFUNC(medical,handleDamage);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_unit setDamage (damage _unit + _damage);
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,54 +0,0 @@
|
|||||||
// by commy2
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
#define BARREL_MUZZLE "usti hlavne"
|
|
||||||
|
|
||||||
_unit = _this select 0;
|
|
||||||
_vehicle = vehicle (_this select 1);
|
|
||||||
_distance = _this select 2;
|
|
||||||
_weapon = _this select 3;
|
|
||||||
|
|
||||||
if (vehicle _unit != _unit || {!([gunner _firer] call EFUNC(common,isPlayer))}) exitWith {};
|
|
||||||
|
|
||||||
_dangerZoneAngle = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Angle") / 2;
|
|
||||||
_dangerZoneRange = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Range");
|
|
||||||
_dangerZoneDamage = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Damage");
|
|
||||||
|
|
||||||
_position = ATLToASL (_vehicle modelToWorld (_vehicle selectionPosition BARREL_MUZZLE));
|
|
||||||
_direction = _vehicle weaponDirection _weapon;
|
|
||||||
|
|
||||||
if (_unit != _vehicle) then {
|
|
||||||
_azimuth = (_direction select 0) atan2 (_direction select 1);
|
|
||||||
_inclination = asin (_direction select 2);
|
|
||||||
|
|
||||||
_relativePosition = eyePos _unit;
|
|
||||||
_relativeDirection = _relativePosition vectorDiff _position;
|
|
||||||
|
|
||||||
_relativeAzimuth = (_relativeDirection select 0) atan2 (_relativeDirection select 1);
|
|
||||||
_relativeInclination = asin (_relativeDirection select 2);
|
|
||||||
|
|
||||||
_angle = sqrt ((_relativeAzimuth - _azimuth) ^ 2 + (_relativeInclination - _inclination) ^ 2);
|
|
||||||
_distance = vectorMagnitude _relativeDirection;
|
|
||||||
|
|
||||||
_line = [_position, _relativePosition];
|
|
||||||
|
|
||||||
if (_angle < _dangerZoneAngle && {_distance < _dangerZoneRange} && {!lineIntersects (_line + [_vehicle])} && {!terrainIntersectASL _line}) then {
|
|
||||||
_alpha = sqrt (1 - _distance / _dangerZoneRange);
|
|
||||||
_beta = sqrt (1 - _angle / _dangerZoneAngle);
|
|
||||||
|
|
||||||
_damage = 2 * _alpha * _beta * _dangerZoneDamage;
|
|
||||||
if (_unit == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
|
|
||||||
|
|
||||||
// TODO: Sort this interaction with medical
|
|
||||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
|
||||||
[_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
|
||||||
_unit spawn {
|
|
||||||
sleep 0.5;
|
|
||||||
[_this, "", 0, objNull, objNull] call EFUNC(medical,handleDamage);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_unit setDamage (damage _unit + _damage);
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
@ -1 +0,0 @@
|
|||||||
#include "\z\ace\addons\backblast\script_component.hpp"
|
|
@ -1,12 +0,0 @@
|
|||||||
#define COMPONENT backblast
|
|
||||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_BACKBLAST
|
|
||||||
#define DEBUG_MODE_FULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG_SETTINGS_BACKBLAST
|
|
||||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_BACKBLAST
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
|
@ -9,7 +9,6 @@ class Extended_PostInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//release escorted captive when entering a vehicle
|
//release escorted captive when entering a vehicle
|
||||||
class Extended_GetIn_EventHandlers {
|
class Extended_GetIn_EventHandlers {
|
||||||
class All {
|
class All {
|
||||||
@ -18,7 +17,6 @@ class Extended_GetIn_EventHandlers {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//reset captive animation after leaving vehicle
|
//reset captive animation after leaving vehicle
|
||||||
class Extended_GetOut_EventHandlers {
|
class Extended_GetOut_EventHandlers {
|
||||||
class All {
|
class All {
|
||||||
@ -27,7 +25,6 @@ class Extended_GetOut_EventHandlers {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//reset captivity and escorting status when getting killed
|
//reset captivity and escorting status when getting killed
|
||||||
class Extended_Killed_EventHandlers {
|
class Extended_Killed_EventHandlers {
|
||||||
class CAManBase {
|
class CAManBase {
|
||||||
@ -36,7 +33,6 @@ class Extended_Killed_EventHandlers {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//mission start
|
//mission start
|
||||||
class Extended_InitPost_EventHandlers {
|
class Extended_InitPost_EventHandlers {
|
||||||
class CAManBase {
|
class CAManBase {
|
||||||
@ -45,4 +41,3 @@ class Extended_InitPost_EventHandlers {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
InterpolateTo[] = {"Unconscious",0.01};
|
InterpolateTo[] = {"Unconscious",0.01};
|
||||||
};
|
};
|
||||||
class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||||
speed = 0.333; //for gameplay reasons, slow this down
|
speed = 0.5; //for gameplay reasons, slow this down
|
||||||
actions = "CivilStandActions";
|
actions = "CivilStandActions";
|
||||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||||
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
||||||
|
@ -2,70 +2,78 @@ class CfgVehicles {
|
|||||||
class Man;
|
class Man;
|
||||||
class CAManBase: Man {
|
class CAManBase: Man {
|
||||||
class ACE_Actions {
|
class ACE_Actions {
|
||||||
class ACE_ApplyHandcuffs {
|
class ACE_RightHandActions {
|
||||||
displayName = "$STR_ACE_Captives_SetCaptive";
|
selection = "righthand";
|
||||||
distance = 4;
|
displayName = "Right hand";
|
||||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
|
distance = 5;
|
||||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs)) || ([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs)));
|
||||||
exceptions[] = {};
|
class ACE_ApplyHandcuffs {
|
||||||
showDisabled = 0;
|
displayName = "$STR_ACE_Captives_SetCaptive";
|
||||||
priority = 2.4;
|
distance = 4;
|
||||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
|
||||||
hotkey = "C";
|
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
|
||||||
|
exceptions[] = {};
|
||||||
|
showDisabled = 0;
|
||||||
|
priority = 2.4;
|
||||||
|
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||||
|
hotkey = "C";
|
||||||
|
};
|
||||||
|
class ACE_RemoveHandcuffs {
|
||||||
|
displayName = "$STR_ACE_Captives_ReleaseCaptive";
|
||||||
|
distance = 4;
|
||||||
|
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
|
||||||
|
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
|
||||||
|
exceptions[] = {};
|
||||||
|
showDisabled = 0;
|
||||||
|
priority = 2.4;
|
||||||
|
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||||
|
hotkey = "R";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
class ACE_RemoveHandcuffs {
|
class ACE_MainActions {
|
||||||
displayName = "$STR_ACE_Captives_ReleaseCaptive";
|
class ACE_EscortCaptive {
|
||||||
distance = 4;
|
displayName = "$STR_ACE_Captives_EscortCaptive";
|
||||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
|
distance = 4;
|
||||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
|
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive));
|
||||||
exceptions[] = {};
|
statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
|
||||||
showDisabled = 0;
|
exceptions[] = {};
|
||||||
priority = 2.4;
|
showDisabled = 0;
|
||||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||||
hotkey = "R";
|
priority = 2.3;
|
||||||
};
|
hotkey = "E";
|
||||||
class ACE_EscortCaptive {
|
};
|
||||||
displayName = "$STR_ACE_Captives_EscortCaptive";
|
class ACE_StopEscorting {
|
||||||
distance = 4;
|
displayName = "$STR_ACE_Captives_StopEscorting";
|
||||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive));
|
distance = 4;
|
||||||
statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
|
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
|
||||||
exceptions[] = {};
|
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
|
||||||
showDisabled = 0;
|
exceptions[] = {QGVAR(isNotEscorting)};
|
||||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
showDisabled = 0;
|
||||||
priority = 2.3;
|
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||||
hotkey = "E";
|
priority = 2.3;
|
||||||
};
|
hotkey = "E";
|
||||||
class ACE_StopEscorting {
|
};
|
||||||
displayName = "$STR_ACE_Captives_StopEscorting";
|
class ACE_LoadCaptive {
|
||||||
distance = 4;
|
displayName = "$STR_ACE_Captives_LoadCaptive";
|
||||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
|
distance = 4;
|
||||||
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
|
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
|
||||||
exceptions[] = {QGVAR(isNotEscorting)};
|
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
|
||||||
showDisabled = 0;
|
exceptions[] = {QGVAR(isNotEscorting)};
|
||||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
showDisabled = 0;
|
||||||
priority = 2.3;
|
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||||
hotkey = "E";
|
priority = 2.2;
|
||||||
};
|
hotkey = "L";
|
||||||
class ACE_LoadCaptive {
|
};
|
||||||
displayName = "$STR_ACE_Captives_LoadCaptive";
|
class ACE_FriskPerson {
|
||||||
distance = 4;
|
displayName = "$STR_ACE_Captives_FriskPerson";
|
||||||
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
|
distance = 2;
|
||||||
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
|
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson));
|
||||||
exceptions[] = {QGVAR(isNotEscorting)};
|
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson));
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
//icon = ""; //@todo
|
||||||
priority = 2.2;
|
priority = 3;
|
||||||
hotkey = "L";
|
hotkey = "F";
|
||||||
};
|
};
|
||||||
class ACE_FriskPerson {
|
|
||||||
displayName = "$STR_ACE_Captives_FriskPerson";
|
|
||||||
distance = 2;
|
|
||||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson));
|
|
||||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson));
|
|
||||||
showDisabled = 0;
|
|
||||||
//icon = ""; //@todo
|
|
||||||
priority = 3;
|
|
||||||
hotkey = "F";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,7 +90,7 @@ class CfgVehicles {
|
|||||||
class ACE_StartSurrenderingSelf {
|
class ACE_StartSurrenderingSelf {
|
||||||
displayName = "$STR_ACE_Captives_StartSurrendering";
|
displayName = "$STR_ACE_Captives_StartSurrendering";
|
||||||
condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender));
|
condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender));
|
||||||
statement = QUOTE([ARR_2(_player, true)] call FUNC(surrender));
|
statement = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered));
|
||||||
exceptions[] = {};
|
exceptions[] = {};
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0;
|
priority = 0;
|
||||||
@ -90,7 +98,7 @@ class CfgVehicles {
|
|||||||
class ACE_StopSurrenderingSelf {
|
class ACE_StopSurrenderingSelf {
|
||||||
displayName = "$STR_ACE_Captives_StopSurrendering";
|
displayName = "$STR_ACE_Captives_StopSurrendering";
|
||||||
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
|
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
|
||||||
statement = QUOTE([ARR_2(_player, false)] call FUNC(surrender));
|
statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered));
|
||||||
exceptions[] = {QGVAR(isNotSurrendering)};
|
exceptions[] = {QGVAR(isNotSurrendering)};
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0;
|
priority = 0;
|
||||||
@ -100,24 +108,27 @@ class CfgVehicles {
|
|||||||
|
|
||||||
#define MACRO_LOADUNLOADCAPTIVE \
|
#define MACRO_LOADUNLOADCAPTIVE \
|
||||||
class ACE_Actions { \
|
class ACE_Actions { \
|
||||||
class ACE_LoadCaptive { \
|
class ACE_MainActions { \
|
||||||
displayName = "$STR_ACE_Captives_LoadCaptive"; \
|
selection = ""; \
|
||||||
distance = 4; \
|
class ACE_LoadCaptive { \
|
||||||
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
|
displayName = "$STR_ACE_Captives_LoadCaptive"; \
|
||||||
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
|
distance = 4; \
|
||||||
exceptions[] = {QGVAR(isNotEscorting)}; \
|
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
|
||||||
showDisabled = 0; \
|
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
|
||||||
priority = 1.2; \
|
exceptions[] = {QGVAR(isNotEscorting)}; \
|
||||||
hotkey = "L"; \
|
showDisabled = 0; \
|
||||||
}; \
|
priority = 1.2; \
|
||||||
class ACE_UnloadCaptive { \
|
hotkey = "L"; \
|
||||||
displayName = "$STR_ACE_Captives_UnloadCaptive"; \
|
}; \
|
||||||
distance = 4; \
|
class ACE_UnloadCaptive { \
|
||||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \
|
displayName = "$STR_ACE_Captives_UnloadCaptive"; \
|
||||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \
|
distance = 4; \
|
||||||
showDisabled = 0; \
|
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \
|
||||||
priority = 1.2; \
|
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \
|
||||||
hotkey = "C"; \
|
showDisabled = 0; \
|
||||||
|
priority = 1.2; \
|
||||||
|
hotkey = "C"; \
|
||||||
|
}; \
|
||||||
}; \
|
}; \
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
|
||||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
|
||||||
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
|
||||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
|
||||||
|
|
||||||
//Handles when someone starts escorting and then disconnects, leaving the captive attached
|
//Handles when someone starts escorting and then disconnects, leaving the captive attached
|
||||||
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
|
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
addMissionEventHandler ["HandleDisconnect", {
|
addMissionEventHandler ["HandleDisconnect", {
|
||||||
PARAMS_1(_disconnectedPlayer);
|
PARAMS_1(_disconnectedPlayer);
|
||||||
@ -21,6 +18,15 @@ if (isServer) then {
|
|||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
["playerVehicleChanged", {_this call FUNC(handleVehicleChanged)}] call EFUNC(common,addEventHandler);
|
||||||
|
["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
|
||||||
|
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
||||||
|
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
||||||
|
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
|
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
||||||
|
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
//TODO: Medical Integration Events???
|
//TODO: Medical Integration Events???
|
||||||
|
|
||||||
// [_unit, "knockedOut", {
|
// [_unit, "knockedOut", {
|
||||||
|
@ -23,9 +23,10 @@ PREP(handleKnockedOut);
|
|||||||
PREP(handlePlayerChanged);
|
PREP(handlePlayerChanged);
|
||||||
PREP(handleUnitInitPost);
|
PREP(handleUnitInitPost);
|
||||||
PREP(handleWokeUp);
|
PREP(handleWokeUp);
|
||||||
|
PREP(handleZeusDisplayChanged);
|
||||||
PREP(moduleSurrender);
|
PREP(moduleSurrender);
|
||||||
PREP(setHandcuffed);
|
PREP(setHandcuffed);
|
||||||
PREP(surrender);
|
PREP(setSurrendered);
|
||||||
PREP(vehicleCaptiveMoveIn);
|
PREP(vehicleCaptiveMoveIn);
|
||||||
PREP(vehicleCaptiveMoveOut);
|
PREP(vehicleCaptiveMoveOut);
|
||||||
|
|
||||||
|
@ -19,22 +19,10 @@
|
|||||||
PARAMS_1(_unit);
|
PARAMS_1(_unit);
|
||||||
DEFAULT_PARAM(1,_target,objNull);
|
DEFAULT_PARAM(1,_target,objNull);
|
||||||
|
|
||||||
private ["_isAttached"];
|
|
||||||
|
|
||||||
if (isNull _target) then {
|
if (isNull _target) then {
|
||||||
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isNull _target) exitWith {
|
if (isNull _target) exitWith {false};
|
||||||
ERROR("Null Target (no ACE_escortedUnit)");
|
|
||||||
false
|
|
||||||
};
|
|
||||||
|
|
||||||
_isAttached = _target in (attachedObjects _unit);
|
(_target in (attachedObjects _unit)) && {_target getVariable [QGVAR(isHandcuffed), false]}
|
||||||
|
|
||||||
if (_isAttached && (!(_target getVariable [QGVAR(isHandcuffed), false]))) exitWith {
|
|
||||||
ERROR("Attached But Not Captive");
|
|
||||||
false
|
|
||||||
};
|
|
||||||
|
|
||||||
_isAttached
|
|
||||||
|
@ -18,5 +18,12 @@
|
|||||||
|
|
||||||
PARAMS_2(_unit,_newSurrenderState);
|
PARAMS_2(_unit,_newSurrenderState);
|
||||||
|
|
||||||
//TODO: any other conditions??
|
private "_returnValue";
|
||||||
(!((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _newSurrenderState))
|
|
||||||
|
_returnValue = if (_newSurrenderState) then {
|
||||||
|
!(_unit getVariable [QGVAR(isSurrendering), false]); //Not currently surrendering
|
||||||
|
} else {
|
||||||
|
(_unit getVariable [QGVAR(isSurrendering), false]); //is Surrendering
|
||||||
|
};
|
||||||
|
|
||||||
|
_returnValue
|
||||||
|
@ -19,6 +19,12 @@
|
|||||||
|
|
||||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
PARAMS_3(_vehicle,_dontcare,_unit);
|
||||||
|
|
||||||
if ((local _unit) && (_unit getVariable [QGVAR(isEscorting), false])) then {
|
if (local _unit) then {
|
||||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
if (_unit getVariable [QGVAR(isEscorting), false]) then {
|
||||||
|
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||||
|
[_unit, false] call FUNC(setSurrender);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,2 +1,25 @@
|
|||||||
// by commy2
|
/*
|
||||||
|
* Author: commy2, PabstMirror
|
||||||
|
* Handles when a unit gets knocked out. Ends surrendering.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [bob, true] call ACE_captives_fnc_handleKnockedOut
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
//ToDo: Waiting on medical integration
|
||||||
|
|
||||||
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
|
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
|
||||||
|
[_unit, false] call FUNC(setSurrendered);
|
||||||
|
};
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
PARAMS_2(_newUnit,_oldUnit);
|
PARAMS_2(_newUnit,_oldUnit);
|
||||||
|
|
||||||
|
//set showHUD based on new unit status:
|
||||||
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||||
TRACE_1("Player Change (showHUD false)",_newUnit);
|
TRACE_1("Player Change (showHUD false)",_newUnit);
|
||||||
showHUD false;
|
showHUD false;
|
||||||
@ -25,3 +26,8 @@ if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable
|
|||||||
TRACE_1("Player Change (showHUD true)",_newUnit);
|
TRACE_1("Player Change (showHUD true)",_newUnit);
|
||||||
showHUD true;
|
showHUD true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//If old player was escorting, stop
|
||||||
|
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
|
||||||
|
_oldUnit setVariable [QGVAR(isEscorting), false, true];
|
||||||
|
};
|
||||||
|
@ -29,6 +29,6 @@ if (local _unit) then {
|
|||||||
|
|
||||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||||
_unit setVariable [QGVAR(isSurrendering), false];
|
_unit setVariable [QGVAR(isSurrendering), false];
|
||||||
[_unit, true] call FUNC(surrender);
|
[_unit, true] call FUNC(setSurrendered);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
31
addons/captives/functions/fnc_handleZeusDisplayChanged.sqf
Normal file
31
addons/captives/functions/fnc_handleZeusDisplayChanged.sqf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Author: PabstMirror
|
||||||
|
* Handles ZeusDisplayChanged event
|
||||||
|
* Need to reset showHUD after closing zeus
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
* 1: Display is now open <BOOL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [bob1, false] call ACE_captives_fnc_handleZeusDisplayChanged
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_2(_unit,_zeusIsOpen);
|
||||||
|
|
||||||
|
//set showHUD based on unit status:
|
||||||
|
if (!_zeusIsOpen) then {
|
||||||
|
if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||||
|
TRACE_1("Player Change (showHUD false)",_unit);
|
||||||
|
showHUD false;
|
||||||
|
} else {
|
||||||
|
TRACE_1("Player Change (showHUD true)",_unit);
|
||||||
|
showHUD true;
|
||||||
|
};
|
||||||
|
};
|
@ -27,19 +27,31 @@ if (local _logic) then {
|
|||||||
if ((count _bisMouseOver) == 2) then {//check what mouse was over before the module was placed
|
if ((count _bisMouseOver) == 2) then {//check what mouse was over before the module was placed
|
||||||
_mouseOverObject = _bisMouseOver select 1;
|
_mouseOverObject = _bisMouseOver select 1;
|
||||||
if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then {
|
if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then {
|
||||||
systemChat format ["Debug - module surrendering %1", (name _mouseOverObject)];
|
TRACE_2("Debug - module surrendering %1",_mouseOverObject,(name _mouseOverObject));
|
||||||
[_mouseOverObject, true] call FUNC(surrender);
|
if (alive _mouseOverObject) then {
|
||||||
|
if (!(_mouseOverObject getVariable [QGVAR(isSurrendering), false])) then {
|
||||||
|
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, true]] call EFUNC(common,targetEvent);
|
||||||
|
} else {
|
||||||
|
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, false]] call EFUNC(common,targetEvent);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
["STR_ACE_Captives_Zeus_OnlyAlive"] call EFUNC(common,displayTextStructured);
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
systemChat format ["Only use on dismounted inf"];
|
["STR_ACE_Captives_Zeus_OnlyInfentry"] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
systemChat format ["Nothing under mouse"];
|
["STR_ACE_Captives_Zeus_NothingSelected"] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
} else {//an editor module
|
} else {
|
||||||
{
|
//an editor module
|
||||||
systemChat format ["Debug - module surrendering %1", (name _x)];
|
//Modules run before postInit can instal the event handler, so we need to wait a little bit
|
||||||
[_x, true] call FUNC(surrender);
|
[{
|
||||||
} forEach _units;
|
PARAMS_1(_units);
|
||||||
|
{
|
||||||
|
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
||||||
|
} forEach _units;
|
||||||
|
}, [_units], 0.05, 0.05]call EFUNC(common,waitAndExecute);
|
||||||
};
|
};
|
||||||
|
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
|
@ -18,19 +18,23 @@
|
|||||||
|
|
||||||
PARAMS_2(_unit,_state);
|
PARAMS_2(_unit,_state);
|
||||||
|
|
||||||
// We only want this function to work on local machines
|
|
||||||
if (!local _unit) exitwith {
|
|
||||||
[_this, QUOTE(FUNC(setHandcuffed)), _unit] call EFUNC(common,execRemoteFnc);
|
|
||||||
TRACE_2("running setHandcuffed on remote unit",_unit,_state);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_state isEqualTo (_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
if (!local _unit) exitwith {
|
||||||
LOG("setHandcuffed: current state same as new");
|
ERROR("running setHandcuffed on remote unit");
|
||||||
|
};
|
||||||
|
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
|
||||||
|
ERROR("setHandcuffed: current state same as new");
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_state) then {
|
if (_state) then {
|
||||||
_unit setVariable [QGVAR(isHandcuffed), true, true];
|
_unit setVariable [QGVAR(isHandcuffed), true, true];
|
||||||
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
|
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
|
||||||
|
|
||||||
|
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
|
||||||
|
[_unit, false] call FUNC(setSurrendered);
|
||||||
|
};
|
||||||
|
|
||||||
|
//Set unit cargoIndex (will be -1 if dismounted)
|
||||||
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
|
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
|
||||||
|
|
||||||
if (_unit == ACE_player) then {
|
if (_unit == ACE_player) then {
|
||||||
@ -43,11 +47,30 @@ if (_state) then {
|
|||||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
|
//Adds an animation changed eh
|
||||||
|
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||||
|
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||||
|
PARAMS_2(_unit,_newAnimation);
|
||||||
|
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
|
||||||
|
ERROR("Handcuff animation interrupted");
|
||||||
|
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||||
|
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
_unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID];
|
||||||
|
|
||||||
};
|
};
|
||||||
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
|
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
|
||||||
} else {
|
} else {
|
||||||
_unit setVariable [QGVAR(isHandcuffed), false, true];
|
_unit setVariable [QGVAR(isHandcuffed), false, true];
|
||||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||||
|
|
||||||
|
//remove AnimChanged EH
|
||||||
|
_animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||||
|
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||||
|
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
|
||||||
|
|
||||||
if ((vehicle _unit) == _unit) then {
|
if ((vehicle _unit) == _unit) then {
|
||||||
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
||||||
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||||
|
101
addons/captives/functions/fnc_setSurrendered.sqf
Normal file
101
addons/captives/functions/fnc_setSurrendered.sqf
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* Author: commy2 PabstMirror
|
||||||
|
* Lets a unit surrender
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
* 1: True to surrender, false to un-surrender <BOOL>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [Pierre, true] call ACE_captives_fnc_setSurrendered;
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_2(_unit,_state);
|
||||||
|
|
||||||
|
|
||||||
|
if (!local _unit) exitwith {
|
||||||
|
ERROR("running surrender on remote unit");
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) exitWith {
|
||||||
|
ERROR("Surrender: current state same as new");
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_state) then {
|
||||||
|
if ((vehicle _unit) != _unit) exitWith {ERROR("Cannot surrender while mounted");};
|
||||||
|
if (_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {ERROR("Cannot surrender while handcuffed");};
|
||||||
|
|
||||||
|
_unit setVariable [QGVAR(isSurrendering), true, true];
|
||||||
|
|
||||||
|
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
|
||||||
|
|
||||||
|
if (_unit == ACE_player) then {
|
||||||
|
showHUD false;
|
||||||
|
};
|
||||||
|
|
||||||
|
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||||
|
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
|
// fix anim on mission start (should work on dedicated servers)
|
||||||
|
[{
|
||||||
|
PARAMS_1(_unit);
|
||||||
|
if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then {
|
||||||
|
//Adds an animation changed eh
|
||||||
|
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||||
|
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||||
|
PARAMS_2(_unit,_newAnimation);
|
||||||
|
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
|
||||||
|
ERROR("Surrender animation interrupted");
|
||||||
|
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||||
|
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
_unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID];
|
||||||
|
};
|
||||||
|
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
} else {
|
||||||
|
_unit setVariable [QGVAR(isSurrendering), false, true];
|
||||||
|
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||||
|
|
||||||
|
//remove AnimChanged EH
|
||||||
|
_animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||||
|
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||||
|
_unit setVariable [QGVAR(surrenderAnimEHID), -1];
|
||||||
|
|
||||||
|
if (_unit == ACE_player) then {
|
||||||
|
//only re-enable HUD if not handcuffed
|
||||||
|
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
||||||
|
showHUD true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_unit getVariable ["ACE_isUnconscious", false]) exitWith {}; //don't touch animations if unconscious
|
||||||
|
|
||||||
|
//if we are in "hands up" animationState, crack it now
|
||||||
|
if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) then {
|
||||||
|
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||||
|
} else {
|
||||||
|
//spin up a PFEH, to watching animationState for the next 20 seconds to make sure we don't enter "hands up"
|
||||||
|
//Handles long animation chains
|
||||||
|
[{
|
||||||
|
PARAMS_2(_args,_pfID);
|
||||||
|
EXPLODE_2_PVT(_args,_unit,_maxTime);
|
||||||
|
//If waited long enough or they re-surrendered or they are unconscious, exit loop
|
||||||
|
if ((time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
|
||||||
|
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
//Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition)
|
||||||
|
if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) exitWith {
|
||||||
|
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||||
|
//Break out of hands up animation loop
|
||||||
|
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||||
|
};
|
||||||
|
}, 0, [_unit, (time + 20)]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
};
|
||||||
|
};
|
@ -1,76 +0,0 @@
|
|||||||
/*
|
|
||||||
* Author: commy2 PabstMirror
|
|
||||||
* Lets a unit surrender
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* 0: Unit <OBJECT>
|
|
||||||
* 1: State <BOOL>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* Nothing
|
|
||||||
*
|
|
||||||
* Example:
|
|
||||||
* [Pierre, true] call ACE_captives_fnc_surrender;
|
|
||||||
*
|
|
||||||
* Public: No
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
PARAMS_2(_unit,_state);
|
|
||||||
|
|
||||||
// We only want this function to work on local machines
|
|
||||||
if (!local _unit) exitwith {
|
|
||||||
[_this, QUOTE(FUNC(surrender)), _unit] call EFUNC(common,execRemoteFnc);
|
|
||||||
TRACE_2("running surrender on remote unit",_unit,_state);
|
|
||||||
};
|
|
||||||
|
|
||||||
if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) then {
|
|
||||||
LOG("Surrender: current state same as new");
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_state) then {
|
|
||||||
_unit setVariable [QGVAR(isSurrendering), true, true];
|
|
||||||
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
|
|
||||||
|
|
||||||
if (_unit == ACE_player) then {
|
|
||||||
showHUD false;
|
|
||||||
};
|
|
||||||
|
|
||||||
// fix anim on mission start (should work on dedicated servers)
|
|
||||||
[{
|
|
||||||
PARAMS_1(_unit);
|
|
||||||
if (_unit getVariable [QGVAR(isSurrendering), false] && {vehicle _unit == _unit}) then {
|
|
||||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
|
||||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
|
||||||
};
|
|
||||||
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
|
|
||||||
|
|
||||||
//PFEH - (TODO: move to event system?)
|
|
||||||
[{
|
|
||||||
EXPLODE_1_PVT((_this select 0),_unit);
|
|
||||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
|
||||||
//If unit dies, gets knocked out, or is handcuffed then end surrender
|
|
||||||
if ((!alive _unit) || {_unit getVariable ["ACE_isUnconscious", false]} || {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
|
|
||||||
[_unit, false] call FUNC(surrender);
|
|
||||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
|
||||||
};
|
|
||||||
}, 0.0, [_unit]] call CBA_fnc_addPerFrameHandler;
|
|
||||||
} else {
|
|
||||||
_unit setVariable [QGVAR(isSurrendering), false, true];
|
|
||||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
|
||||||
|
|
||||||
if ((vehicle _unit) == _unit) then {
|
|
||||||
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
|
||||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_unit == ACE_player) then {
|
|
||||||
//only re-enable HUD if not handcuffed
|
|
||||||
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
|
||||||
showHUD true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Edited with tabler - 2015-02-06 -->
|
<!-- Edited with tabler - 2015-02-24 -->
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Captives">
|
<Package name="Captives">
|
||||||
<Key ID="STR_ACE_Captives_SetCaptive">
|
<Key ID="STR_ACE_Captives_SetCaptive">
|
||||||
@ -136,5 +136,14 @@
|
|||||||
<Key ID="STR_ACE_Captives_StopSurrendering">
|
<Key ID="STR_ACE_Captives_StopSurrendering">
|
||||||
<English>Stop Surrendering</English>
|
<English>Stop Surrendering</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Captives_Zeus_OnlyAlive">
|
||||||
|
<English>Only use on alive units</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Captives_Zeus_OnlyInfentry">
|
||||||
|
<English>Only use on dismounted inf</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Captives_Zeus_NothingSelected">
|
||||||
|
<English>Nothing under mouse</English>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
@ -38,7 +38,7 @@ class Extended_Respawn_EventHandlers {
|
|||||||
respawn = QUOTE(_this call FUNC(setName));
|
respawn = QUOTE(_this call FUNC(setName));
|
||||||
};
|
};
|
||||||
class GVAR(RESETDefaults) {
|
class GVAR(RESETDefaults) {
|
||||||
respawn = QUOTE(_this call FUNC(resetAllDefaults_F));
|
respawn = QUOTE(_this call FUNC(resetAllDefaults));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -17,14 +17,15 @@ class RscTitles {
|
|||||||
class HintBox: RscStructuredText {
|
class HintBox: RscStructuredText {
|
||||||
idc = 1;
|
idc = 1;
|
||||||
text = "";
|
text = "";
|
||||||
size = "1 / 40 / (getResolution select 5)";
|
//size = "1 / 40 / (getResolution select 5)";
|
||||||
sizeEx = 1;
|
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||||
colorText[] = {1, 1, 1, 1};
|
colorText[] = {1, 1, 1, 1};
|
||||||
colorBackground[] = {0, 0, 0, 0.5};
|
colorBackground[] = {0, 0, 0, 0.5};
|
||||||
x = safeZoneW + safeZoneX - 0 * safezoneW; //safeZoneW + safeZoneX - 0.2 * safezoneW;
|
x = safeZoneW + safeZoneX - 0 * safezoneW; //safeZoneW + safeZoneX - 0.2 * safezoneW;
|
||||||
y = safeZoneY + 0.2 * safezoneH;
|
y = safeZoneY + 0.2 * safezoneH;
|
||||||
w = 0.2 * safeZoneW;
|
w = 0.2 * safeZoneW;
|
||||||
h = 0.1 * SafeZoneH;
|
h = 0.1 * SafeZoneH;
|
||||||
|
font = "PuristaMedium";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -36,13 +37,12 @@ class RscTitles {
|
|||||||
fadeIn = 0.2;
|
fadeIn = 0.2;
|
||||||
fadeOut = 0.2;
|
fadeOut = 0.2;
|
||||||
name = "ACE_RscErrorHint";
|
name = "ACE_RscErrorHint";
|
||||||
|
|
||||||
class controls {
|
class controls {
|
||||||
class HintBox: RscStructuredText {
|
class HintBox: RscStructuredText {
|
||||||
idc = 1;
|
idc = 1;
|
||||||
text = "";
|
text = "";
|
||||||
size = "1 / 40 / (getResolution select 5)";
|
//size = "1 / 40 / (getResolution select 5)";
|
||||||
sizeEx = 1;
|
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||||
colorText[] = {1, 1, 1, 1};
|
colorText[] = {1, 1, 1, 1};
|
||||||
colorBackground[] = {0.8, 0, 0, 0.5};
|
colorBackground[] = {0.8, 0, 0, 0.5};
|
||||||
x = 0.3 * safeZoneW + safeZoneX;
|
x = 0.3 * safeZoneW + safeZoneX;
|
||||||
@ -52,6 +52,7 @@ class RscTitles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_EventHandlerHelper: ACE_Rsc_Display_Base {
|
class ACE_EventHandlerHelper: ACE_Rsc_Display_Base {
|
||||||
idd = -1;
|
idd = -1;
|
||||||
class controls {
|
class controls {
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
class ACE_gui_RscProgress;
|
|
||||||
class ACE_gui_staticBase;
|
|
||||||
|
|
||||||
|
|
||||||
class GVAR(ProgressBar_Dialog) {
|
class GVAR(ProgressBar_Dialog) {
|
||||||
idd = -1;
|
idd = -1;
|
||||||
@ -20,7 +17,7 @@ class GVAR(ProgressBar_Dialog) {
|
|||||||
type = 0;
|
type = 0;
|
||||||
style = 0;
|
style = 0;
|
||||||
size = 1;
|
size = 1;
|
||||||
colorBackground[] = {0, 0, 0, 0.1};
|
colorBackground[] = {0, 0, 0, 0.0};
|
||||||
colorText[] = {0, 0, 0, 0};
|
colorText[] = {0, 0, 0, 0};
|
||||||
x = "safezoneX";
|
x = "safezoneX";
|
||||||
y = "safezoneY";
|
y = "safezoneY";
|
||||||
@ -34,7 +31,7 @@ class GVAR(ProgressBar_Dialog) {
|
|||||||
y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||||
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||||
h = ".8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
h = ".8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||||
colorFrame[] = {0,0,0,0.025};
|
colorFrame[] = {0,0,0,0.0};
|
||||||
colorBar[] = {0.27,0.5,0.31,0.8};
|
colorBar[] = {0.27,0.5,0.31,0.8};
|
||||||
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
|
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
|
||||||
};
|
};
|
||||||
|
@ -26,5 +26,5 @@ class RscDisplayInventory {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class RscDisplayChannel {
|
class RscDisplayChannel {
|
||||||
onLoad = QUOTE(_this call GVAR(onLoadRscDisplayChannel));
|
onLoad = QUOTE(_this call FUNC(onLoadRscDisplayChannel));
|
||||||
};
|
};
|
||||||
|
@ -82,7 +82,7 @@ enableCamShake true;
|
|||||||
|
|
||||||
}] call FUNC(addEventhandler);
|
}] call FUNC(addEventhandler);
|
||||||
|
|
||||||
GVAR(OldPlayerInventory) = ACE_player call FUNC(getAllGear);
|
GVAR(OldPlayerInventory) = [ACE_player] call FUNC(getAllGear);
|
||||||
GVAR(OldPlayerVisionMode) = currentVisionMode ACE_player;
|
GVAR(OldPlayerVisionMode) = currentVisionMode ACE_player;
|
||||||
GVAR(OldZeusDisplayIsOpen) = !(isNull findDisplay 312);
|
GVAR(OldZeusDisplayIsOpen) = !(isNull findDisplay 312);
|
||||||
GVAR(OldCameraView) = cameraView;
|
GVAR(OldCameraView) = cameraView;
|
||||||
@ -93,7 +93,7 @@ GVAR(OldPlayerTurret) = [ACE_player] call FUNC(getTurretIndex);
|
|||||||
[{
|
[{
|
||||||
|
|
||||||
// "playerInventoryChanged" event
|
// "playerInventoryChanged" event
|
||||||
_newPlayerInventory = ACE_player call FUNC(getAllGear);
|
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
|
||||||
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
|
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldPlayerInventory) = _newPlayerInventory;
|
GVAR(OldPlayerInventory) = _newPlayerInventory;
|
||||||
@ -158,3 +158,6 @@ GVAR(OldPlayerTurret) = [ACE_player] call FUNC(getTurretIndex);
|
|||||||
PARAMS_2(_vehicle,_fuelLevel);
|
PARAMS_2(_vehicle,_fuelLevel);
|
||||||
_vehicle setFuel _fuelLevel;
|
_vehicle setFuel _fuelLevel;
|
||||||
}] call FUNC(addEventhandler);
|
}] call FUNC(addEventhandler);
|
||||||
|
|
||||||
|
["displayTextStructured", FUNC(displayTextStructured)] call FUNC(addEventhandler);
|
||||||
|
["displayTextPicture", FUNC(displayTextPicture)] call FUNC(addEventhandler);
|
||||||
|
@ -15,12 +15,17 @@ PREP(addSetting);
|
|||||||
PREP(adminKick);
|
PREP(adminKick);
|
||||||
PREP(ambientBrightness);
|
PREP(ambientBrightness);
|
||||||
PREP(applyForceWalkStatus);
|
PREP(applyForceWalkStatus);
|
||||||
|
PREP(beingCarried);
|
||||||
PREP(binarizeNumber);
|
PREP(binarizeNumber);
|
||||||
|
PREP(blurScreen);
|
||||||
PREP(callCustomEventHandlers);
|
PREP(callCustomEventHandlers);
|
||||||
PREP(callCustomEventHandlersGlobal);
|
PREP(callCustomEventHandlersGlobal);
|
||||||
PREP(canGetInPosition);
|
PREP(canGetInPosition);
|
||||||
|
PREP(canInteract);
|
||||||
PREP(canInteractWith);
|
PREP(canInteractWith);
|
||||||
PREP(canUseWeapon);
|
PREP(canUseWeapon);
|
||||||
|
PREP(carriedByObj);
|
||||||
|
PREP(carryObj);
|
||||||
PREP(changeProjectileDirection);
|
PREP(changeProjectileDirection);
|
||||||
PREP(checkPBOs);
|
PREP(checkPBOs);
|
||||||
PREP(claim);
|
PREP(claim);
|
||||||
@ -30,7 +35,12 @@ PREP(codeToString);
|
|||||||
PREP(convertKeyCode);
|
PREP(convertKeyCode);
|
||||||
PREP(createOrthonormalReference);
|
PREP(createOrthonormalReference);
|
||||||
PREP(currentChannel);
|
PREP(currentChannel);
|
||||||
|
PREP(debug);
|
||||||
|
PREP(debugModule);
|
||||||
|
PREP(defineVariable);
|
||||||
|
PREP(disableAI);
|
||||||
PREP(disableUserInput);
|
PREP(disableUserInput);
|
||||||
|
PREP(displayIcon);
|
||||||
PREP(displayText);
|
PREP(displayText);
|
||||||
PREP(displayTextPicture);
|
PREP(displayTextPicture);
|
||||||
PREP(displayTextStructured);
|
PREP(displayTextStructured);
|
||||||
@ -42,12 +52,21 @@ PREP(execRemoteFnc);
|
|||||||
PREP(executePersistent);
|
PREP(executePersistent);
|
||||||
PREP(filter);
|
PREP(filter);
|
||||||
PREP(fixLoweredRifleAnimation);
|
PREP(fixLoweredRifleAnimation);
|
||||||
|
PREP(getAllDefinedSetVariables);
|
||||||
PREP(getAllGear);
|
PREP(getAllGear);
|
||||||
PREP(getCaptivityStatus);
|
PREP(getCaptivityStatus);
|
||||||
|
PREP(getCarriedBy);
|
||||||
|
PREP(getCarriedObj);
|
||||||
PREP(getConfigCommander);
|
PREP(getConfigCommander);
|
||||||
PREP(getConfigGunner);
|
PREP(getConfigGunner);
|
||||||
|
PREP(getDeathAnim);
|
||||||
PREP(getDefaultAnim);
|
PREP(getDefaultAnim);
|
||||||
|
PREP(getDefinedVariable);
|
||||||
|
PREP(getDefinedVariableDefault);
|
||||||
|
PREP(getDefinedVariableInfo);
|
||||||
PREP(getDoorTurrets);
|
PREP(getDoorTurrets);
|
||||||
|
PREP(getFirstObjectIntersection);
|
||||||
|
PREP(getFirstTerrainIntersection);
|
||||||
PREP(getForceWalkStatus);
|
PREP(getForceWalkStatus);
|
||||||
PREP(getGunner);
|
PREP(getGunner);
|
||||||
PREP(getHitPoints);
|
PREP(getHitPoints);
|
||||||
@ -56,6 +75,7 @@ PREP(getInPosition);
|
|||||||
PREP(getMarkerType);
|
PREP(getMarkerType);
|
||||||
PREP(getName);
|
PREP(getName);
|
||||||
PREP(getNumberFromMissionSQM);
|
PREP(getNumberFromMissionSQM);
|
||||||
|
PREP(getNumberMagazinesIn);
|
||||||
PREP(getPitchBankYaw);
|
PREP(getPitchBankYaw);
|
||||||
PREP(getSettingData);
|
PREP(getSettingData);
|
||||||
PREP(getStringFromMissionSQM);
|
PREP(getStringFromMissionSQM);
|
||||||
@ -74,28 +94,43 @@ PREP(getUavControlPosition);
|
|||||||
PREP(getVehicleCargo);
|
PREP(getVehicleCargo);
|
||||||
PREP(getVehicleCodriver);
|
PREP(getVehicleCodriver);
|
||||||
PREP(getVehicleCrew);
|
PREP(getVehicleCrew);
|
||||||
|
PREP(getVersion);
|
||||||
PREP(getWeaponAzimuthAndInclination);
|
PREP(getWeaponAzimuthAndInclination);
|
||||||
|
PREP(getWeaponIndex);
|
||||||
PREP(getWeaponType);
|
PREP(getWeaponType);
|
||||||
PREP(getWindDirection);
|
PREP(getWindDirection);
|
||||||
PREP(goKneeling);
|
PREP(goKneeling);
|
||||||
PREP(hadamardProduct);
|
PREP(hadamardProduct);
|
||||||
|
PREP(hasItem);
|
||||||
|
PREP(hasMagazine);
|
||||||
|
PREP(inheritsFrom);
|
||||||
|
PREP(insertionSort);
|
||||||
PREP(interpolateFromArray);
|
PREP(interpolateFromArray);
|
||||||
PREP(inTransitionAnim);
|
PREP(inTransitionAnim);
|
||||||
|
PREP(inWater);
|
||||||
|
PREP(isArrested);
|
||||||
PREP(isAutoWind);
|
PREP(isAutoWind);
|
||||||
|
PREP(isAwake);
|
||||||
PREP(isEngineer);
|
PREP(isEngineer);
|
||||||
PREP(isEOD);
|
PREP(isEOD);
|
||||||
PREP(isInBuilding);
|
PREP(isInBuilding);
|
||||||
|
PREP(isModLoaded);
|
||||||
PREP(isPlayer);
|
PREP(isPlayer);
|
||||||
PREP(isTurnedOut);
|
PREP(isTurnedOut);
|
||||||
PREP(letterToCode);
|
PREP(letterToCode);
|
||||||
|
PREP(limitMovementSpeed);
|
||||||
|
PREP(loadPerson);
|
||||||
|
PREP(loadPersonLocal);
|
||||||
PREP(loadSettingsFromProfile);
|
PREP(loadSettingsFromProfile);
|
||||||
PREP(loadSettingsOnServer);
|
PREP(loadSettingsOnServer);
|
||||||
PREP(map);
|
PREP(map);
|
||||||
PREP(moduleCheckPBOs);
|
PREP(moduleCheckPBOs);
|
||||||
PREP(moduleLSDVehicles);
|
PREP(moduleLSDVehicles);
|
||||||
|
PREP(moveToTempGroup);
|
||||||
PREP(muteUnit);
|
PREP(muteUnit);
|
||||||
PREP(numberToDigits);
|
PREP(numberToDigits);
|
||||||
PREP(numberToDigitsString);
|
PREP(numberToDigitsString);
|
||||||
|
PREP(onAnswerRequest);
|
||||||
PREP(onLoadRscDisplayChannel);
|
PREP(onLoadRscDisplayChannel);
|
||||||
PREP(owned);
|
PREP(owned);
|
||||||
PREP(player);
|
PREP(player);
|
||||||
@ -103,31 +138,53 @@ PREP(playerSide);
|
|||||||
PREP(progressBar);
|
PREP(progressBar);
|
||||||
PREP(queueAnimation);
|
PREP(queueAnimation);
|
||||||
PREP(readSettingFromModule);
|
PREP(readSettingFromModule);
|
||||||
|
PREP(receiveRequest);
|
||||||
PREP(removeActionEventHandler);
|
PREP(removeActionEventHandler);
|
||||||
PREP(removeActionMenuEventHandler);
|
PREP(removeActionMenuEventHandler);
|
||||||
PREP(removeCameraEventHandler);
|
PREP(removeCameraEventHandler);
|
||||||
PREP(removeCustomEventHandler);
|
PREP(removeCustomEventHandler);
|
||||||
PREP(removeMapMarkerCreatedEventHandler);
|
PREP(removeMapMarkerCreatedEventHandler);
|
||||||
PREP(removeScrollWheelEventHandler);
|
PREP(removeScrollWheelEventHandler);
|
||||||
|
PREP(requestCallback);
|
||||||
|
PREP(resetAllDefaults);
|
||||||
PREP(restoreVariablesJIP);
|
PREP(restoreVariablesJIP);
|
||||||
PREP(revertKeyCodeLocalized);
|
PREP(revertKeyCodeLocalized);
|
||||||
PREP(sanitizeString);
|
PREP(sanitizeString);
|
||||||
|
PREP(sendRequest);
|
||||||
PREP(serverLog);
|
PREP(serverLog);
|
||||||
|
PREP(setArrestState);
|
||||||
|
PREP(setCanInteract);
|
||||||
PREP(setCaptivityStatus);
|
PREP(setCaptivityStatus);
|
||||||
|
PREP(setCarriedBy);
|
||||||
|
PREP(setDefinedVariable);
|
||||||
|
PREP(setDisableUserInputStatus);
|
||||||
PREP(setForceWalkStatus);
|
PREP(setForceWalkStatus);
|
||||||
|
PREP(setHearingCapability);
|
||||||
PREP(setName);
|
PREP(setName);
|
||||||
PREP(setParameter);
|
PREP(setParameter);
|
||||||
PREP(setPitchBankYaw);
|
PREP(setPitchBankYaw);
|
||||||
PREP(setVariableJIP);
|
PREP(setProne);
|
||||||
PREP(setSetting);
|
PREP(setSetting);
|
||||||
PREP(setSettingFromConfig);
|
PREP(setSettingFromConfig);
|
||||||
|
PREP(setVariableJIP);
|
||||||
|
PREP(setVariablePublic);
|
||||||
|
PREP(setVolume);
|
||||||
|
PREP(sortAlphabeticallyBy);
|
||||||
|
PREP(stringCompare);
|
||||||
PREP(stringToColoredText);
|
PREP(stringToColoredText);
|
||||||
|
PREP(stringRemoveWhiteSpace);
|
||||||
PREP(subString);
|
PREP(subString);
|
||||||
|
PREP(switchToGroupSide);
|
||||||
|
PREP(throttledPublicVariable);
|
||||||
PREP(toBin);
|
PREP(toBin);
|
||||||
PREP(toBitmask);
|
PREP(toBitmask);
|
||||||
PREP(toHex);
|
PREP(toHex);
|
||||||
PREP(toNumber);
|
PREP(toNumber);
|
||||||
|
PREP(uniqueElementsOnly);
|
||||||
|
PREP(unloadPerson);
|
||||||
PREP(unmuteUnit);
|
PREP(unmuteUnit);
|
||||||
|
PREP(useItem);
|
||||||
|
PREP(useMagazine);
|
||||||
PREP(waitAndExecute);
|
PREP(waitAndExecute);
|
||||||
|
|
||||||
// ACE_Debug
|
// ACE_Debug
|
||||||
@ -192,74 +249,6 @@ if (hasInterface) then {
|
|||||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
PREP(stringCompare);
|
|
||||||
PREP(string_removeWhiteSpace);
|
|
||||||
PREP(isHC);
|
|
||||||
PREP(sendRequest_f);
|
|
||||||
PREP(requestCallback);
|
|
||||||
PREP(receiveRequest);
|
|
||||||
PREP(onAnswerRequest);
|
|
||||||
PREP(debug);
|
|
||||||
PREP(debugModule);
|
|
||||||
PREP(defineVariable);
|
|
||||||
PREP(setDefinedVariable);
|
|
||||||
PREP(getDefinedVariable);
|
|
||||||
PREP(getAllDefinedSetVariables);
|
|
||||||
PREP(getDefinedVariableInfo);
|
|
||||||
PREP(getDefinedVariableDefault);
|
|
||||||
PREP(getDeathAnim);
|
|
||||||
PREP(insertionSort);
|
|
||||||
PREP(uniqueElementsOnly);
|
|
||||||
PREP(sortAlphabeticallyBy);
|
|
||||||
PREP(hasMagazine);
|
|
||||||
PREP(useMagazine);
|
|
||||||
PREP(findMagazine);
|
|
||||||
PREP(hasItem);
|
|
||||||
PREP(useItem);
|
|
||||||
PREP(findItem);
|
|
||||||
PREP(getNumberMagazinesIn);
|
|
||||||
PREP(setCanInteract);
|
|
||||||
PREP(getCanInteract);
|
|
||||||
PREP(canInteract);
|
|
||||||
PREP(resetAllDefaults_f);
|
|
||||||
PREP(broadcastSound3D_f);
|
|
||||||
|
|
||||||
PREP(isAwake);
|
|
||||||
PREP(setProne);
|
|
||||||
|
|
||||||
PREP(setDisableUserInputStatus);
|
|
||||||
|
|
||||||
PREP(dropWeapon_f);
|
|
||||||
PREP(inWater_f);
|
|
||||||
PREP(setVolume_f);
|
|
||||||
PREP(closeAllDialogs_f);
|
|
||||||
PREP(disableAI_f);
|
|
||||||
PREP(switchToGroupSide_f);
|
|
||||||
PREP(getFirstObjectIntersection);
|
|
||||||
PREP(getFirstTerrainIntersection);
|
|
||||||
PREP(setHearingCapability);
|
|
||||||
PREP(revealObject_f);
|
|
||||||
PREP(getWeaponItems_f);
|
|
||||||
PREP(isModLoaded_f);
|
|
||||||
PREP(inheritsFrom);
|
|
||||||
PREP(getVersion);
|
|
||||||
PREP(carryObj);
|
|
||||||
PREP(carriedByObj);
|
|
||||||
PREP(getCarriedObj);
|
|
||||||
PREP(getCarriedBy);
|
|
||||||
PREP(beingCarried);
|
|
||||||
PREP(setCarriedBy);
|
|
||||||
|
|
||||||
|
|
||||||
PREP(moveToTempGroup);
|
|
||||||
|
|
||||||
|
|
||||||
PREP(limitMovementSpeed);
|
|
||||||
PREP(setArrestState);
|
|
||||||
PREP(isArrested);
|
|
||||||
PREP(loadPerson_F);
|
|
||||||
PREP(loadPersonLocal_F);
|
|
||||||
PREP(unloadPerson_F);
|
|
||||||
|
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
|
||||||
|
isHC = !(hasInterface || isDedicated);
|
||||||
|
@ -94,8 +94,41 @@ class ACE_Settings {
|
|||||||
isClientSetable = 1;
|
isClientSetable = 1;
|
||||||
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
|
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
|
||||||
};
|
};
|
||||||
|
class GVAR(settingFeedbackIcons) {
|
||||||
|
value = 1;
|
||||||
|
typeName = "SCALAR";
|
||||||
|
force = 0;
|
||||||
|
isClientSetable = 1;
|
||||||
|
displayName = "$STR_ACE_Common_SettingFeedbackIconsName";
|
||||||
|
description = "$STR_ACE_Common_SettingFeedbackIconsDesc";
|
||||||
|
values[] = {"Hide", "Top right, downwards", "Top right, to the left", "Top left, downwards", "Top left, to the right"};
|
||||||
|
};
|
||||||
|
class GVAR(SettingProgressBarLocation) {
|
||||||
|
value = 0;
|
||||||
|
typeName = "SCALAR";
|
||||||
|
force = 0;
|
||||||
|
isClientSetable = 1;
|
||||||
|
displayName = "$STR_ACE_Common_SettingProgressbarLocationName";
|
||||||
|
description = "$STR_ACE_Common_SettingProgressbarLocationDesc";
|
||||||
|
values[] = {"Top", "Bottom"};
|
||||||
|
};
|
||||||
|
class GVAR(displayTextColor) {
|
||||||
|
value[] = {0,0,0,0.1};
|
||||||
|
typeName = "COLOR";
|
||||||
|
isClientSetable = 1;
|
||||||
|
displayName = "$STR_ACE_Common_SettingDisplayTextColorName";
|
||||||
|
description = "$STR_ACE_Common_SettingDisplayTextColorDesc";
|
||||||
|
};
|
||||||
|
class GVAR(displayTextFontColor) {
|
||||||
|
value[] = {1,1,1,1};
|
||||||
|
typeName = "COLOR";
|
||||||
|
isClientSetable = 1;
|
||||||
|
displayName = "$STR_ACE_Common_SettingDisplayTextFontColorName";
|
||||||
|
description = "$STR_ACE_Common_SettingDisplayTextFontColorDesc";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include "define.hpp"
|
||||||
#include <ProgressScreen.hpp>
|
#include <ProgressScreen.hpp>
|
||||||
#include <HintConfig.hpp>
|
#include <HintConfig.hpp>
|
||||||
#include <RscInfoType.hpp>
|
#include <RscInfoType.hpp>
|
||||||
@ -103,3 +136,23 @@ class ACE_Settings {
|
|||||||
#include <FixAnimations.hpp>
|
#include <FixAnimations.hpp>
|
||||||
#include <NoVoice.hpp>
|
#include <NoVoice.hpp>
|
||||||
|
|
||||||
|
class CfgUIGrids {
|
||||||
|
class IGUI {
|
||||||
|
class Presets {
|
||||||
|
class Arma3 {
|
||||||
|
class Variables {
|
||||||
|
grid_ACE_displayText[] = {{((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)),safeZoneY + 0.175 * safezoneH, (10 *(((safezoneW / safezoneH) min 1.2) / 40)), (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))}, "(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Variables {
|
||||||
|
class grid_ACE_displayText {
|
||||||
|
displayName = "ACE Hint";
|
||||||
|
description = "Textual in game feedback to the player.";
|
||||||
|
preview = "\a3\Ui_f\data\GUI\Cfg\UIGrids\grid_hint_ca.paa";
|
||||||
|
saveToProfile[] = {0,1};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -182,12 +182,12 @@ class ACE_gui_buttonBase {
|
|||||||
bottom = 0.00;
|
bottom = 0.00;
|
||||||
};
|
};
|
||||||
textureNoShortcut = "";
|
textureNoShortcut = "";
|
||||||
animTextureNormal = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa) );
|
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||||
animTextureDisabled = QUOTE( PATHTOF(data\buttonDisabled_gradient.paa));
|
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)";
|
||||||
animTextureOver = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
|
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
|
||||||
animTextureFocused = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
|
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
|
||||||
animTexturePressed = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
|
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
|
||||||
animTextureDefault = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
|
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
|
||||||
period = 0.5;
|
period = 0.5;
|
||||||
font = FontCSE;
|
font = FontCSE;
|
||||||
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
|
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
|
@ -1,16 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_broadcastSound3D_f.sqf
|
|
||||||
* @Descr: Plays a sound in 3D
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: [unit OBJECT, sound STRING]
|
|
||||||
* @Return: void
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if (isDedicated) exitwith{};
|
|
||||||
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
|
||||||
_sound = [_this, 1, "",[""]] call BIS_fnc_Param;
|
|
||||||
_unit say3D _sound;
|
|
@ -1,14 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_closeAllDialogs_f.sqf
|
|
||||||
* @Descr: Close all dialogs
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return: void
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
while {dialog} do {
|
|
||||||
closeDialog 0;
|
|
||||||
};
|
|
@ -14,4 +14,4 @@
|
|||||||
#define CHANNELS ["group", "side", "global", "command", "vehicle", "direct"]
|
#define CHANNELS ["group", "side", "global", "command", "vehicle", "direct"]
|
||||||
#define CHANNELS_LOCALIZED [localize "str_channel_group", localize "str_channel_side", localize "str_channel_global", localize "str_channel_command", localize "str_channel_vehicle", localize "str_channel_direct"]
|
#define CHANNELS_LOCALIZED [localize "str_channel_group", localize "str_channel_side", localize "str_channel_global", localize "str_channel_command", localize "str_channel_vehicle", localize "str_channel_direct"]
|
||||||
|
|
||||||
CHANNELS select (CHANNELS_LOCALIZED find (uiNamespace getVariable ["ACE_currentChannel", ""])) max 0
|
CHANNELS select (CHANNELS_LOCALIZED find (uiNamespace getVariable [QGVAR(currentChannel), ""])) max 0
|
||||||
|
120
addons/common/functions/fnc_displayIcon.sqf
Normal file
120
addons/common/functions/fnc_displayIcon.sqf
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
/*
|
||||||
|
* Author: Glowbal
|
||||||
|
*
|
||||||
|
* Draw progress bar and execute given function if succesful.
|
||||||
|
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: icon ID <STRING>
|
||||||
|
* 1: show <BOOL>
|
||||||
|
* 2: Icon Path <STRING>
|
||||||
|
* 3: Icon color <ARRAY>
|
||||||
|
* 4: timeAlive. -1 = forever <NUMBER> <OPTIONAL>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1], 0] call ace_gui_fnc_displayIcon;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
// positions for the icon UI
|
||||||
|
#define RIGHT_SIDE (safezoneW + safezoneX)
|
||||||
|
#define LEFT_SIDE safezoneX
|
||||||
|
#define TOP_SIDE safeZoneY
|
||||||
|
#define BOTTOM_SIDE (safeZoneH + safezoneY)
|
||||||
|
#define ICON_WIDTH (2 * (((safezoneW / safezoneH) min 1.2) / 40))
|
||||||
|
#define X_POS_ICONS (RIGHT_SIDE - (1.5 * ICON_WIDTH))
|
||||||
|
#define Y_POS_ICONS (TOP_SIDE + (2.5 * ICON_WIDTH))
|
||||||
|
#define DIFFERENCE_ICONS (1.1 * ICON_WIDTH)
|
||||||
|
#define X_POS_ICONS_SECOND (RIGHT_SIDE - (4.4 * ICON_WIDTH))
|
||||||
|
#define Y_POS_ICONS_SECOND (TOP_SIDE + (1.1 * ICON_WIDTH))
|
||||||
|
|
||||||
|
// setting values
|
||||||
|
#define TOP_RIGHT_DOWN 1
|
||||||
|
#define TOP_RIGHT_LEFT 2
|
||||||
|
#define TOP_LEFT_DOWN 3
|
||||||
|
#define TOP_LEFT_RIGHT 4
|
||||||
|
|
||||||
|
// other constants
|
||||||
|
#define DEFAULT_TIME 6
|
||||||
|
|
||||||
|
private ["_iconId", "_show", "_icon", "_allControls", "_refresh", "_timeAlive", "_list", "_color"];
|
||||||
|
_iconId = _this select 0;
|
||||||
|
_show = _this select 1;
|
||||||
|
_icon = _this select 2;
|
||||||
|
_color = _this select 3;
|
||||||
|
_timeAlive = if (count _this > 4) then {_this select 4} else {DEFAULT_TIME};
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
_list = missionNamespace getvariable [QGVAR(displayIconList),[]];
|
||||||
|
|
||||||
|
_refresh = {
|
||||||
|
private ["_allControls"];
|
||||||
|
// Refreshing of all icons..
|
||||||
|
_allControls = missionNamespace getvariable [QGVAR(displayIconListControls), []];
|
||||||
|
{
|
||||||
|
ctrlDelete _x;
|
||||||
|
}foreach _allControls;
|
||||||
|
|
||||||
|
_allControls = [];
|
||||||
|
|
||||||
|
private ["_ctrl", "_setting"];
|
||||||
|
_setting = missionNamespace getvariable[QGVAR(settingFeedbackIcons), 0];
|
||||||
|
if (_setting > 0) then {
|
||||||
|
{
|
||||||
|
// +19000 because we want to make certain we are using free IDCs..
|
||||||
|
_ctrl = ((findDisplay 46) ctrlCreate ["RscPicture", _foreachIndex + 19000]);
|
||||||
|
_position = switch (_setting) do {
|
||||||
|
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||||
|
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
|
||||||
|
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||||
|
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
|
||||||
|
default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||||
|
};
|
||||||
|
_ctrl ctrlSetPosition _position;
|
||||||
|
_ctrl ctrlsetText (_x select 1);
|
||||||
|
_ctrl ctrlSetTextColor (_x select 2);
|
||||||
|
_ctrl ctrlCommit 0;
|
||||||
|
_allControls pushback _ctrl;
|
||||||
|
}foreach (missionNamespace getvariable [QGVAR(displayIconList),[]]);
|
||||||
|
};
|
||||||
|
missionNamespace setvariable [QGVAR(displayIconListControls), _allControls];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_show) then {
|
||||||
|
if ({(_x select 0 == _iconId)} count _list == 0) then {
|
||||||
|
_list pushback [_iconId, _icon, _color, time];
|
||||||
|
} else {
|
||||||
|
{
|
||||||
|
if (_x select 0 == _iconId) exitwith {
|
||||||
|
_list set [_foreachIndex, [_iconId, _icon, _color, time]];
|
||||||
|
};
|
||||||
|
}foreach _list;
|
||||||
|
};
|
||||||
|
missionNamespace setvariable [QGVAR(displayIconList), _list];
|
||||||
|
call _refresh;
|
||||||
|
|
||||||
|
if (_timeAlive >= 0) then {
|
||||||
|
[{
|
||||||
|
[_this select 0, false, "", [0,0,0], 0] call FUNC(displayIcon);
|
||||||
|
}, [_iconId], _timeAlive, _timeAlive] call EFUNC(common,waitAndExecute);
|
||||||
|
};
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if ({(_x select 0 == _iconId)} count _list == 1) then {
|
||||||
|
private "_newList";
|
||||||
|
_newList = [];
|
||||||
|
{
|
||||||
|
if (_x select 0 != _iconId) then {
|
||||||
|
_newList pushback _x;
|
||||||
|
};
|
||||||
|
}foreach _list;
|
||||||
|
|
||||||
|
missionNamespace setvariable [QGVAR(displayIconList), _newList];
|
||||||
|
call _refresh;
|
||||||
|
};
|
||||||
|
};
|
@ -18,36 +18,32 @@
|
|||||||
#define DEFAULT_DELAY 2
|
#define DEFAULT_DELAY 2
|
||||||
#define DEFAULT_PRIORITY 0
|
#define DEFAULT_PRIORITY 0
|
||||||
|
|
||||||
if (isNil QGVAR(lastHint)) then {
|
|
||||||
GVAR(lastHint) = [0, 0];
|
|
||||||
};
|
|
||||||
|
|
||||||
_this resize 4;
|
_this resize 4;
|
||||||
|
|
||||||
_this spawn {
|
private ["_text", "_sound", "_delay", "_priority", "_lastHintTime", "_lastHintPriority", "_time"];
|
||||||
private ["_text", "_sound", "_delay", "_priority", "_lastHintTime", "_lastHintPriority", "_time"];
|
_text = _this select 0;
|
||||||
|
_sound = _this select 1;
|
||||||
|
_delay = _this select 2;
|
||||||
|
_priority = _this select 3;
|
||||||
|
|
||||||
_text = _this select 0;
|
if (isNil QGVAR(lastHint)) then {
|
||||||
_sound = _this select 1;
|
GVAR(lastHint) = [0, 0];
|
||||||
_delay = _this select 2;
|
};
|
||||||
_priority = _this select 3;
|
|
||||||
|
|
||||||
_lastHintTime = GVAR(lastHint) select 0;
|
_lastHintTime = GVAR(lastHint) select 0;
|
||||||
_lastHintPriority = GVAR(lastHint) select 1;
|
_lastHintPriority = GVAR(lastHint) select 1;
|
||||||
|
|
||||||
if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text};
|
if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text};
|
||||||
if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND};
|
if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND};
|
||||||
if (isNil "_delay") then {_delay = DEFAULT_DELAY};
|
if (isNil "_delay") then {_delay = DEFAULT_DELAY};
|
||||||
if (isNil "_priority") then {_priority = DEFAULT_PRIORITY};
|
if (isNil "_priority") then {_priority = DEFAULT_PRIORITY};
|
||||||
|
|
||||||
_time = time;
|
_time = time;
|
||||||
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
|
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
|
||||||
hintSilent _text;
|
hintSilent _text;
|
||||||
if (_sound) then {playSound "ACE_Sound_Click"};
|
if (_sound) then {playSound "ACE_Sound_Click"};
|
||||||
GVAR(lastHint) set [0, _time];
|
GVAR(lastHint) set [0, _time];
|
||||||
GVAR(lastHint) set [1, _priority];
|
GVAR(lastHint) set [1, _priority];
|
||||||
|
|
||||||
sleep _delay;
|
[{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call FUNC(waitAndExecute);
|
||||||
if (_time == GVAR(lastHint) select 0) then {hintSilent ""};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -1,30 +1,44 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2, Glowbal
|
||||||
*
|
*
|
||||||
* Display a structured text with image.
|
* Display a structured text with image.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Text (Anything)
|
* 0: Text <ANY>
|
||||||
* 1: Image (String)
|
* 1: Image <STRING>
|
||||||
|
* 2: Image color <ARRAY> <OPTIONAL>
|
||||||
|
* 3: Target Unit. Will only display if target is the player controlled object <OBJECT> <OPTIONAL>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Nothing
|
* Nothing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_text", "_image"];
|
private ["_text", "_image", "_imageColor", "_target"];
|
||||||
|
|
||||||
_text = _this select 0;
|
_text = _this select 0;
|
||||||
_image = _this select 1;
|
_image = _this select 1;
|
||||||
|
_imageColor = if (count _this > 2) then {_this select 2} else {[1,1,1]};
|
||||||
|
_imageColor resize 3;
|
||||||
|
_target = if (count _this > 3) then {_this select 3} else {ACE_player};
|
||||||
|
|
||||||
|
if (_target != ACE_player) exitWith {};
|
||||||
|
|
||||||
if (typeName _text != "TEXT") then {
|
if (typeName _text != "TEXT") then {
|
||||||
_text = parseText format ["<t align='center'>%1</t>", _text];
|
if (typeName _text == "ARRAY") then {
|
||||||
|
if (count _text > 0) then {
|
||||||
|
{
|
||||||
|
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||||
|
_text set [_foreachIndex, localize _x];
|
||||||
|
};
|
||||||
|
}foreach _text;
|
||||||
|
_text = format _text;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||||
|
_text = localize _text;
|
||||||
|
};
|
||||||
|
_text = parseText format ["<t align='center'>%1</t>", _text];
|
||||||
};
|
};
|
||||||
|
_text = composeText [parseText format ["<img size='2' align='center' color='%2' image='%1'/>", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text];
|
||||||
_text = composeText [
|
[_text, 2] call FUNC(displayTextStructured);
|
||||||
parseText format ["<img size='2.5' align='center' color='#ffffff' image='%1'/>", _image],
|
|
||||||
lineBreak,
|
|
||||||
_text
|
|
||||||
];
|
|
||||||
|
|
||||||
[_text] call FUNC(displayTextStructured);
|
|
||||||
|
@ -1,26 +1,41 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2, Glowbal
|
||||||
*
|
*
|
||||||
* Display a structured text.
|
* Display a structured text.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Text (Anything)
|
* 0: Text <ANY>
|
||||||
* 1: Size of the textbox (Number, optional default: 1)
|
* 1: Size of the textbox <NUMBER> <OPTIONAL>
|
||||||
|
* 2: Target Unit. Will only display if target is the player controlled object <OBJECT> <OPTIONAL>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Nothing
|
* Nothing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_text", "_size", "_isShown", "_ctrlHint"];
|
private ["_text", "_size", "_isShown", "_ctrlHint", "_yPos", "_xPos", "_wPos", "_hPos", "_position", "_target"];
|
||||||
|
|
||||||
_text = _this select 0;
|
_text = _this select 0;
|
||||||
_size = _this select 1;
|
_size = if (count _this > 1) then {_this select 1} else {1.5;};
|
||||||
|
_target = if (count _this > 2) then {_this select 2} else {ACE_player};
|
||||||
|
|
||||||
if (isNil "_size") then {_size = 1};
|
if (_target != ACE_player) exitWith {};
|
||||||
|
|
||||||
if (typeName _text != "TEXT") then {
|
if (typeName _text != "TEXT") then {
|
||||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
if (typeName _text == "ARRAY") then {
|
||||||
|
if (count _text > 0) then {
|
||||||
|
{
|
||||||
|
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||||
|
_text set [_foreachIndex, localize _x];
|
||||||
|
};
|
||||||
|
}foreach _text;
|
||||||
|
_text = format _text;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||||
|
_text = localize _text;
|
||||||
|
};
|
||||||
|
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||||
};
|
};
|
||||||
|
|
||||||
_isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
|
_isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
|
||||||
@ -30,19 +45,31 @@ _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
|
|||||||
disableSerialization;
|
disableSerialization;
|
||||||
_ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
_ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
||||||
|
|
||||||
_ctrlHint ctrlSetPosition [
|
_ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
|
||||||
safeZoneW + safeZoneX - 0 * safezoneW,
|
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
||||||
safeZoneY + 0.2 * safezoneH,
|
/*
|
||||||
0.2 * safeZoneW,
|
// This does not function at the moment. Has been disabled until it fixed.
|
||||||
_size * 0.1 * SafeZoneH
|
_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||||
];
|
_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||||
|
_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||||
|
_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||||
|
*/
|
||||||
|
|
||||||
|
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||||
|
_yPos = safeZoneY + 0.175 * safezoneH;
|
||||||
|
_wPos = (10 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||||
|
_hPos = (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
|
||||||
|
|
||||||
|
//Zeus Interface Open and Display would be under the "CREATE" list
|
||||||
|
if (!isnull curatorCamera) then {
|
||||||
|
_xPos = _xPos min ((safezoneX + safezoneW - 12.5 * (((safezoneW / safezoneH) min 1.2) / 40)) - _wPos);
|
||||||
|
};
|
||||||
|
|
||||||
|
_position = [_xPos, _yPos, _wPos, _size * _hPos];
|
||||||
|
|
||||||
|
_ctrlHint ctrlSetPosition _position;
|
||||||
_ctrlHint ctrlCommit 0;
|
_ctrlHint ctrlCommit 0;
|
||||||
|
|
||||||
_ctrlHint ctrlSetStructuredText _text;
|
_ctrlHint ctrlSetStructuredText _text;
|
||||||
_ctrlHint ctrlSetPosition [
|
_ctrlHint ctrlSetPosition _position;
|
||||||
safeZoneW + safeZoneX - 0.2 * safezoneW,
|
_ctrlHint ctrlCommit ([0.5, 0] select _isShown);
|
||||||
safeZoneY + 0.2 * safezoneH,
|
|
||||||
0.2 * safeZoneW,
|
|
||||||
_size * 0.1 * SafeZoneH
|
|
||||||
];
|
|
||||||
_ctrlHint ctrlCommit ([0.2, 0] select _isShown);
|
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_dropWeapon_f.sqf
|
|
||||||
* @Descr: N/A
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return:
|
|
||||||
* @PublicAPI: false
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
private ["_unit","_currentWeapon","_currentAnimation", "_WeaponHolder"];
|
|
||||||
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
|
||||||
|
|
||||||
_currentWeapon = currentWeapon _unit;
|
|
||||||
_currentAnimation = animationState _unit;
|
|
||||||
_WeaponHolder = "GroundWeaponHolder" createVehicle position _unit;
|
|
||||||
|
|
||||||
_unit removeWeapon _currentWeapon;
|
|
||||||
_weaponHolder addWeaponCargoGlobal [_currentWeapon, 1];
|
|
||||||
//_unit action [ "DropWeapon", _WeaponHolder, _currentWeapon ];
|
|
||||||
_WeaponHolder setPos (getPos _unit);
|
|
||||||
//_unit switchMove _currentAnimation;
|
|
||||||
|
|
||||||
_primairyWeapon = primaryWeapon _unit;
|
|
||||||
_secondairyWeapon = secondaryWeapon _unit;
|
|
||||||
_handGunWeapon = handgunWeapon _unit;
|
|
||||||
|
|
||||||
switch (_currentWeapon) do {
|
|
||||||
case _primairyWeapon: {
|
|
||||||
|
|
||||||
};
|
|
||||||
case _secondairyWeapon: {
|
|
||||||
|
|
||||||
};
|
|
||||||
case _handGunWeapon: {
|
|
||||||
|
|
||||||
};
|
|
||||||
default {};
|
|
||||||
};
|
|
@ -14,17 +14,17 @@
|
|||||||
|
|
||||||
// ACRE
|
// ACRE
|
||||||
if (isClass (configFile >> "CfgPatches" >> "acre_main")) then {
|
if (isClass (configFile >> "CfgPatches" >> "acre_main")) then {
|
||||||
[-1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
[-1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||||
[0] call acre_core_fnc_handleMultiPttKeyPressUp;
|
[0] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||||
[1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
[1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||||
[2] call acre_core_fnc_handleMultiPttKeyPressUp;
|
[2] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TFAR
|
// TFAR
|
||||||
if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then {
|
if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then {
|
||||||
call TFAR_fnc_onSwTangentReleased;
|
call TFAR_fnc_onSwTangentReleased;
|
||||||
call TFAR_fnc_onAdditionalSwTangentReleased;
|
call TFAR_fnc_onAdditionalSwTangentReleased;
|
||||||
call TFAR_fnc_onLRTangentReleased;
|
call TFAR_fnc_onLRTangentReleased;
|
||||||
call TFAR_fnc_onAdditionalLRTangentReleased;
|
call TFAR_fnc_onAdditionalLRTangentReleased;
|
||||||
call TFAR_fnc_onDDTangentReleased;
|
call TFAR_fnc_onDDTangentReleased;
|
||||||
};
|
};
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// by commy2
|
// by commy2
|
||||||
/*
|
/*
|
||||||
usage:
|
usage:
|
||||||
|
|
||||||
(configFile >> "CfgAmmo") call FUNC(exportConfig);
|
(configFile >> "CfgAmmo") call FUNC(exportConfig);
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_findItem.sqf
|
|
||||||
* @Descr:
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return:
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
private ["_unit","_magazine","_return"];
|
|
||||||
_unit = _this select 0;
|
|
||||||
_item = _this select 1;
|
|
||||||
|
|
||||||
if (_item in (uniformItems _unit)) exitwith {1};
|
|
||||||
if (_item in (vestItems _unit)) exitwith {2};
|
|
||||||
if (_item in (backpackItems _unit)) exitwith {3};
|
|
||||||
if (_item in (assignedItems _unit)) exitwith {4};
|
|
||||||
if (_item in (primaryWeaponItems _unit)) exitwith {5};
|
|
||||||
if (_item in (secondaryWeaponItems _unit)) exitwith {6};
|
|
||||||
if (_item in (handgunItems _unit)) exitwith {7};
|
|
||||||
if (_item in (items _unit)) exitwith {8}; // in case it is in items but cannot be found in any other container (should never reach this)
|
|
||||||
|
|
||||||
// If we cannot find the item, return 0.
|
|
||||||
0;
|
|
@ -1,21 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_findMagazine.sqf
|
|
||||||
* @Descr: Find where the current magazines are. Order: uniform, vest, backpack, any.
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: [unit OBJECT, magazine STRING (Classname of magazine)]
|
|
||||||
* @Return: NUMBER 0 = none, 1 = in uniform, 2 = in vest, 3 = in backpack, 4 = found outside container
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
private ["_unit","_magazine"];
|
|
||||||
_unit = _this select 0;
|
|
||||||
_magazine = _this select 1;
|
|
||||||
|
|
||||||
if (_magazine in (getMagazineCargo uniformContainer _unit)) exitwith {1};
|
|
||||||
if (_magazine in (getMagazineCargo vestContainer _unit)) exitwith {2};
|
|
||||||
if (_magazine in (getMagazineCargo backpackContainer _unit)) exitwith {3};
|
|
||||||
if (_magazine in (magazines _unit)) exitwith {4}; // in case it cannot be found in any other container. Most likely loaded in a weapon.
|
|
||||||
|
|
||||||
// If we cannot find the item, return 0.
|
|
||||||
0;
|
|
@ -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"
|
#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"} && {(vehicle _unit) == _unit}) then {
|
||||||
|
|
||||||
if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"}) then {
|
|
||||||
[_unit, "amovpercmstpsraswrfldnon", 0] call FUNC(doAnimation);
|
[_unit, "amovpercmstpsraswrfldnon", 0] call FUNC(doAnimation);
|
||||||
};
|
};
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_getCanInteract.sqf
|
|
||||||
* @Descr: N/A
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return:
|
|
||||||
* @PublicAPI: false
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
((_this select 0) getvariable [QGVAR(canInteract),0])
|
|
@ -1,45 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_getCustomResults_f.sqf
|
|
||||||
* @Descr: Executes custom results eventhandlers, collects their output and returns this.
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: [arguments ANY, handle STRING]
|
|
||||||
* @Return: ARRAY Collection of all return values of all executed CustomResult handlers
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private ["_arguments","_handle","_ehCfg","_eventHandlerCollection","_eventHandlerName","_cfg","_code","_classType", "_return"];
|
|
||||||
_arguments = _this select 0;
|
|
||||||
_handle = _this select 1;
|
|
||||||
|
|
||||||
_eventHandlerName = ("ace_f_custom_results_eventhandler_" + _handle);
|
|
||||||
_eventHandlerCollection = missionNamespace getvariable _eventHandlerName;
|
|
||||||
if (isnil "_eventHandlerCollection") then {
|
|
||||||
_eventHandlerCollection = [];
|
|
||||||
|
|
||||||
// TODO Get a replacement for this
|
|
||||||
_cfg = (ConfigFile >> "Advanced_Combat_Environment" >> "CustomResults" >> _handle);
|
|
||||||
if (isClass _cfg) then {
|
|
||||||
_numberOfEH = count _cfg;
|
|
||||||
for [{_EHiterator=0}, {(_EHiterator< _numberOfEH)}, {_EHiterator=_EHiterator+1}] do {
|
|
||||||
_ehCfg = _cfg select _EHiterator;
|
|
||||||
if (isClass _ehCfg) then {
|
|
||||||
_classType = (ConfigName _ehCfg);
|
|
||||||
_code = (compile getText(_ehCfg >> "onCall"));
|
|
||||||
_eventHandlerCollection pushback [_classType, _code];
|
|
||||||
true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
missionNamespace setvariable [_eventHandlerName, _eventHandlerCollection];
|
|
||||||
};
|
|
||||||
|
|
||||||
_return = [];
|
|
||||||
{
|
|
||||||
_return pushback (_arguments call (_x select 1));
|
|
||||||
false;
|
|
||||||
}count _eventHandlerCollection;
|
|
||||||
|
|
||||||
_return
|
|
@ -20,9 +20,9 @@ private "_gunner";
|
|||||||
_gunner = objNull;
|
_gunner = objNull;
|
||||||
|
|
||||||
{
|
{
|
||||||
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
||||||
_gunner = _vehicle turretUnit _x;
|
_gunner = _vehicle turretUnit _x;
|
||||||
};
|
};
|
||||||
} forEach allTurrets _vehicle;
|
} forEach allTurrets _vehicle;
|
||||||
|
|
||||||
_gunner
|
_gunner
|
||||||
|
@ -23,33 +23,33 @@ _hitpoints = [];
|
|||||||
private "_hitpointClasses";
|
private "_hitpointClasses";
|
||||||
_hitpointClasses = [_config >> "HitPoints"];
|
_hitpointClasses = [_config >> "HitPoints"];
|
||||||
{
|
{
|
||||||
private "_class";
|
private "_class";
|
||||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||||
|
|
||||||
if (isClass _class) then {
|
if (isClass _class) then {
|
||||||
_hitpointClasses pushBack _class;
|
_hitpointClasses pushBack _class;
|
||||||
};
|
};
|
||||||
|
|
||||||
} forEach allTurrets _vehicle;
|
} forEach allTurrets _vehicle;
|
||||||
|
|
||||||
// iterate through all classes with hitpoints and their parents
|
// iterate through all classes with hitpoints and their parents
|
||||||
{
|
{
|
||||||
private "_class";
|
private "_class";
|
||||||
_class = _x;
|
_class = _x;
|
||||||
|
|
||||||
while {isClass _class} do {
|
while {isClass _class} do {
|
||||||
|
|
||||||
for "_i" from 0 to (count _class - 1) do {
|
for "_i" from 0 to (count _class - 1) do {
|
||||||
private "_entry";
|
private "_entry";
|
||||||
_entry = configName (_class select _i);
|
_entry = configName (_class select _i);
|
||||||
|
|
||||||
if (!(_entry in _hitpoints) && {!isNil {_vehicle getHitPointDamage _entry}}) then {
|
if (!(_entry in _hitpoints) && {!isNil {_vehicle getHitPointDamage _entry}}) then {
|
||||||
_hitpoints pushBack _entry;
|
_hitpoints pushBack _entry;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_class = inheritsFrom _class;
|
_class = inheritsFrom _class;
|
||||||
};
|
};
|
||||||
|
|
||||||
} forEach _hitpointClasses;
|
} forEach _hitpointClasses;
|
||||||
|
|
||||||
|
@ -24,36 +24,36 @@ _selections = [];
|
|||||||
private "_hitpointClasses";
|
private "_hitpointClasses";
|
||||||
_hitpointClasses = [_config >> "HitPoints"];
|
_hitpointClasses = [_config >> "HitPoints"];
|
||||||
{
|
{
|
||||||
private "_class";
|
private "_class";
|
||||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||||
|
|
||||||
if (isClass _class) then {
|
if (isClass _class) then {
|
||||||
_hitpointClasses pushBack _class;
|
_hitpointClasses pushBack _class;
|
||||||
};
|
};
|
||||||
|
|
||||||
} forEach allTurrets _vehicle;
|
} forEach allTurrets _vehicle;
|
||||||
|
|
||||||
// iterate through all classes with hitpoints and their parents
|
// iterate through all classes with hitpoints and their parents
|
||||||
{
|
{
|
||||||
private "_class";
|
private "_class";
|
||||||
_class = _x;
|
_class = _x;
|
||||||
|
|
||||||
while {isClass _class} do {
|
while {isClass _class} do {
|
||||||
|
|
||||||
for "_i" from 0 to (count _class - 1) do {
|
for "_i" from 0 to (count _class - 1) do {
|
||||||
private ["_entry", "_selection"];
|
private ["_entry", "_selection"];
|
||||||
|
|
||||||
_entry = configName (_class select _i);
|
_entry = configName (_class select _i);
|
||||||
_selection = getText (_class select _i >> "name");
|
_selection = getText (_class select _i >> "name");
|
||||||
|
|
||||||
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
|
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
|
||||||
_hitpoints pushBack _entry;
|
_hitpoints pushBack _entry;
|
||||||
_selections pushBack _selection;
|
_selections pushBack _selection;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_class = inheritsFrom _class;
|
_class = inheritsFrom _class;
|
||||||
};
|
};
|
||||||
|
|
||||||
} forEach _hitpointClasses;
|
} forEach _hitpointClasses;
|
||||||
|
|
||||||
|
25
addons/common/functions/fnc_getWeaponIndex.sqf
Normal file
25
addons/common/functions/fnc_getWeaponIndex.sqf
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Get the index of the weapon.
|
||||||
|
* 0 = primary, 1 = secondary, 2 = handgun, -1 = other
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
* 1: Weapon <STRING>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Weapon index <NUMBER>
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
EXPLODE_2_PVT(_this,_unit,_weapon);
|
||||||
|
|
||||||
|
if (_weapon == "") exitWith {-1};
|
||||||
|
|
||||||
|
[
|
||||||
|
primaryWeapon _unit,
|
||||||
|
secondaryWeapon _unit,
|
||||||
|
handgunWeapon _unit
|
||||||
|
] find _weapon
|
@ -1,14 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_getWeaponItems_f.sqf
|
|
||||||
* @Descr: Get the weapon items from the unit.
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: [unit OBJECT]
|
|
||||||
* @Return:
|
|
||||||
* @PublicAPI: false
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
private "_unit";
|
|
||||||
_unit = _this select 0;
|
|
||||||
|
|
||||||
[primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit];
|
|
@ -9,18 +9,18 @@ _key = _this select 1;
|
|||||||
ERRORDATA(2);
|
ERRORDATA(2);
|
||||||
_val = nil;
|
_val = nil;
|
||||||
try {
|
try {
|
||||||
if(VALIDHASH(_hash)) then {
|
if(VALIDHASH(_hash)) then {
|
||||||
_index = (_hash select 0) find _key;
|
_index = (_hash select 0) find _key;
|
||||||
if(_index != -1) then {
|
if(_index != -1) then {
|
||||||
_val = (_hash select 1) select _index;
|
_val = (_hash select 1) select _index;
|
||||||
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
|
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
|
||||||
_val = nil;
|
_val = nil;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
ERROR("Input hash is not valid");
|
ERROR("Input hash is not valid");
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
HANDLECATCH;
|
HANDLECATCH;
|
||||||
};
|
};
|
||||||
_val
|
_val
|
||||||
|
@ -9,15 +9,15 @@ _key = _this select 1;
|
|||||||
ERRORDATA(2);
|
ERRORDATA(2);
|
||||||
_val = false;
|
_val = false;
|
||||||
try {
|
try {
|
||||||
if(VALIDHASH(_hash)) then {
|
if(VALIDHASH(_hash)) then {
|
||||||
_index = (_hash select 0) find _key;
|
_index = (_hash select 0) find _key;
|
||||||
if(_index != -1) then {
|
if(_index != -1) then {
|
||||||
_val = true;
|
_val = true;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
ERROR("Input hash is not valid");
|
ERROR("Input hash is not valid");
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
HANDLECATCH;
|
HANDLECATCH;
|
||||||
};
|
};
|
||||||
_val
|
_val
|
||||||
|
@ -7,12 +7,12 @@ _hashList = _this select 0;
|
|||||||
ERRORDATA(1);
|
ERRORDATA(1);
|
||||||
_hashKeys = [];
|
_hashKeys = [];
|
||||||
try {
|
try {
|
||||||
if(VALIDHASH(_hashList)) then {
|
if(VALIDHASH(_hashList)) then {
|
||||||
_hashKeys = (_hashList select 0);
|
_hashKeys = (_hashList select 0);
|
||||||
} else {
|
} else {
|
||||||
ERROR("Input hashlist is not valid");
|
ERROR("Input hashlist is not valid");
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
HANDLECATCH;
|
HANDLECATCH;
|
||||||
};
|
};
|
||||||
[_hashKeys, []];
|
[_hashKeys, []];
|
||||||
|
@ -7,11 +7,11 @@ _hashList = _this select 0;
|
|||||||
_value = _this select 1;
|
_value = _this select 1;
|
||||||
ERRORDATA(2);
|
ERRORDATA(2);
|
||||||
try {
|
try {
|
||||||
if(VALIDHASH(_hashList)) then {
|
if(VALIDHASH(_hashList)) then {
|
||||||
[_hashList, (count (_hashList select 1)), _value] call FUNC(hashListSet);
|
[_hashList, (count (_hashList select 1)), _value] call FUNC(hashListSet);
|
||||||
} else {
|
} else {
|
||||||
ERROR("Input hashlist in push not valid");
|
ERROR("Input hashlist in push not valid");
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
HANDLECATCH;
|
HANDLECATCH;
|
||||||
};
|
};
|
||||||
|
@ -8,20 +8,20 @@ _index = _this select 1;
|
|||||||
ERRORDATA(2);
|
ERRORDATA(2);
|
||||||
_hash = nil;
|
_hash = nil;
|
||||||
try {
|
try {
|
||||||
if(VALIDHASH(_hashList)) then {
|
if(VALIDHASH(_hashList)) then {
|
||||||
_keys = _hashList select 0;
|
_keys = _hashList select 0;
|
||||||
_hashes = _hashList select 1;
|
_hashes = _hashList select 1;
|
||||||
if(_index < (count _hashes)) then {
|
if(_index < (count _hashes)) then {
|
||||||
_values = _hashes select _index;
|
_values = _hashes select _index;
|
||||||
|
|
||||||
_hash = [_keys, _values, 1];
|
_hash = [_keys, _values, 1];
|
||||||
} else {
|
} else {
|
||||||
ERROR("Index of hashlist is out of range");
|
ERROR("Index of hashlist is out of range");
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
ERROR("Input hashlist is not valid");
|
ERROR("Input hashlist is not valid");
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
HANDLECATCH;
|
HANDLECATCH;
|
||||||
};
|
};
|
||||||
_hash;
|
_hash;
|
||||||
|
@ -8,17 +8,17 @@ _index = _this select 1;
|
|||||||
_value = _this select 2;
|
_value = _this select 2;
|
||||||
ERRORDATA(3);
|
ERRORDATA(3);
|
||||||
try {
|
try {
|
||||||
if(VALIDHASH(_hashList)) then {
|
if(VALIDHASH(_hashList)) then {
|
||||||
if(VALIDHASH(_value)) then {
|
if(VALIDHASH(_value)) then {
|
||||||
_vals = _value select 1;
|
_vals = _value select 1;
|
||||||
|
|
||||||
(_hashList select 1) set[_index, _vals];
|
(_hashList select 1) set[_index, _vals];
|
||||||
} else {
|
} else {
|
||||||
ERROR("Set hash in hashlist is not valid");
|
ERROR("Set hash in hashlist is not valid");
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
ERROR("Input hashlist is not valid");
|
ERROR("Input hashlist is not valid");
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
HANDLECATCH;
|
HANDLECATCH;
|
||||||
};
|
};
|
||||||
|
@ -8,23 +8,23 @@ _key = _this select 1;
|
|||||||
ERRORDATA(2);
|
ERRORDATA(2);
|
||||||
_val = nil;
|
_val = nil;
|
||||||
try {
|
try {
|
||||||
if(VALIDHASH(_hash)) then {
|
if(VALIDHASH(_hash)) then {
|
||||||
_index = (_hash select 0) find _key;
|
_index = (_hash select 0) find _key;
|
||||||
if(_index != -1) then {
|
if(_index != -1) then {
|
||||||
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||||
// is this hash is not part of a hash list?
|
// is this hash is not part of a hash list?
|
||||||
// if it is we need to leave the keys intact.
|
// if it is we need to leave the keys intact.
|
||||||
if((count _hash) == 2) then {
|
if((count _hash) == 2) then {
|
||||||
// if this is a standalone hash then we can clean it up
|
// if this is a standalone hash then we can clean it up
|
||||||
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||||
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||||
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
ERROR("Input hash is not valid");
|
ERROR("Input hash is not valid");
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
HANDLECATCH;
|
HANDLECATCH;
|
||||||
};
|
};
|
||||||
true
|
true
|
||||||
|
@ -9,19 +9,19 @@ _key = _this select 1;
|
|||||||
_val = _this select 2;
|
_val = _this select 2;
|
||||||
ERRORDATA(3);
|
ERRORDATA(3);
|
||||||
try {
|
try {
|
||||||
if(VALIDHASH(_hash)) then {
|
if(VALIDHASH(_hash)) then {
|
||||||
_index = (_hash select 0) find _key;
|
_index = (_hash select 0) find _key;
|
||||||
if(_index == -1) then {
|
if(_index == -1) then {
|
||||||
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
|
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
|
||||||
if(_index == -1) then {
|
if(_index == -1) then {
|
||||||
_index = (count (_hash select 0));
|
_index = (count (_hash select 0));
|
||||||
};
|
};
|
||||||
(_hash select 0) set[_index, _key];
|
(_hash select 0) set[_index, _key];
|
||||||
};
|
};
|
||||||
(_hash select 1) set[_index, _val];
|
(_hash select 1) set[_index, _val];
|
||||||
} else {
|
} else {
|
||||||
ERROR("Input hash is not valid");
|
ERROR("Input hash is not valid");
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
HANDLECATCH;
|
HANDLECATCH;
|
||||||
};
|
};
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_isHC.sqf
|
|
||||||
* @Descr: Check if current locality is a headless client
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return: BOOL True if locality is headless client OR is not in multiplayer
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private ["_return"];
|
|
||||||
|
|
||||||
if (!isMultiplayer) then {
|
|
||||||
_return = true;
|
|
||||||
} else {
|
|
||||||
if (isServer && !isDedicated) then {
|
|
||||||
_return = true;
|
|
||||||
} else {
|
|
||||||
_return = !(hasInterface || isDedicated);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
_return
|
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson_F))
|
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||||
|
|
||||||
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"];
|
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"];
|
||||||
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
@ -34,9 +34,9 @@ if (_unit distance _loadcar <= 10) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (!isNull _vehicle) then {
|
if (!isNull _vehicle) then {
|
||||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide_f);
|
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||||
[_caller,objNull] call FUNC(carryObj);
|
[_caller,objNull] call FUNC(carryObj);
|
||||||
[_unit,objNull] call FUNC(carryObj);
|
[_unit,objNull] call FUNC(carryObj);
|
||||||
[[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal_F)), _unit, false] call EFUNC(common,execRemoteFnc);
|
[[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal)), _unit, false] call EFUNC(common,execRemoteFnc);
|
||||||
};
|
};
|
||||||
_vehicle
|
_vehicle
|
@ -16,13 +16,13 @@ _vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
|||||||
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
|
|
||||||
if (!alive _unit) then {
|
if (!alive _unit) then {
|
||||||
_unit = [_unit,_caller] call FUNC(makeCopyOfBody_F);
|
_unit = [_unit,_caller] call FUNC(makeCopyOfBody);
|
||||||
};
|
};
|
||||||
|
|
||||||
_unit moveInCargo _vehicle;
|
_unit moveInCargo _vehicle;
|
||||||
_loaded = _vehicle getvariable [QGVAR(loaded_persons_F),[]];
|
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
|
||||||
_loaded pushback _unit;
|
_loaded pushback _unit;
|
||||||
_vehicle setvariable [QGVAR(loaded_persons_F),_loaded,true];
|
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
|
||||||
if (!([_unit] call FUNC(isAwake))) then {
|
if (!([_unit] call FUNC(isAwake))) then {
|
||||||
_handle = [_unit,_vehicle] spawn {
|
_handle = [_unit,_vehicle] spawn {
|
||||||
private ["_unit","_vehicle"];
|
private ["_unit","_vehicle"];
|
@ -18,12 +18,12 @@ if (_moveTo) then {
|
|||||||
_previousGroup = group _unit;
|
_previousGroup = group _unit;
|
||||||
_newGroup = createGroup (side _previousGroup);
|
_newGroup = createGroup (side _previousGroup);
|
||||||
[_unit] joinSilent _newGroup;
|
[_unit] joinSilent _newGroup;
|
||||||
_unit setvariable [QGVAR(previousGroup_F),_previousGroup];
|
_unit setvariable [QGVAR(previousGroup),_previousGroup];
|
||||||
} else {
|
} else {
|
||||||
_previousGroup = _unit getvariable QGVAR(previousGroup_F);
|
_previousGroup = _unit getvariable QGVAR(previousGroup);
|
||||||
if (!isnil "_previousGroup") then {
|
if (!isnil "_previousGroup") then {
|
||||||
_currentGroup = group _unit;
|
_currentGroup = group _unit;
|
||||||
_unit setvariable [QGVAR(previousGroup_F),nil];
|
_unit setvariable [QGVAR(previousGroup),nil];
|
||||||
[_unit] joinSilent _previousGroup;
|
[_unit] joinSilent _previousGroup;
|
||||||
if (count units _currentGroup == 0) then {
|
if (count units _currentGroup == 0) then {
|
||||||
deleteGroup _currentGroup;
|
deleteGroup _currentGroup;
|
||||||
|
@ -1,24 +1,29 @@
|
|||||||
/*
|
/*
|
||||||
Name: FUNC(onLoadRscDisplayChannel)
|
* Author: Pabst Mirror, commy2
|
||||||
|
* When the RscDisplayChannel is loaded, this will constantly uiNamespace variable ace_common_currentChannel
|
||||||
Author: Pabst Mirror, commy2
|
* with the raw localized text of CA_Channel (IDC=101). Only runs while the display is open.
|
||||||
|
*
|
||||||
Description:
|
* Arguments:
|
||||||
When the RscDisplayChannel is loaded, this will constantly uiNamespace variable "ACE_currentChannel"
|
* 0: The RscDisplayChannel Display <DISPLAY>
|
||||||
with the raw localized text of CA_Channel (IDC=101). Only runs while the display is open.
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* Nothing
|
||||||
0: DISPLAY - RscDisplayChannel
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* onLoad = QUOTE(_this call FUNC(onLoadRscDisplayChannel));
|
||||||
Nothing
|
*
|
||||||
*/
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
uiNamespace setVariable ["ACE_ctrlChannel", (_this select 0) displayCtrl 101];
|
uiNamespace setVariable [QGVAR(currentChannelControl), ((_this select 0) displayCtrl 101)];
|
||||||
|
|
||||||
["ACE_currentChannel", "onEachFrame", {
|
["ACE_currentChannel", "onEachFrame", {
|
||||||
if (ctrlText (uiNamespace getVariable ["ACE_ctrlChannel", controlNull]) != "") then {
|
if (isNull (uiNamespace getVariable [QGVAR(currentChannelControl), controlNull])) then {
|
||||||
uiNamespace setVariable ["ACE_currentChannel", ctrlText (uiNamespace getVariable ["ACE_ctrlChannel", controlNull])];
|
["ACE_currentChannel", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||||
};
|
} else {
|
||||||
|
private "_localizedChannelText";
|
||||||
|
_localizedChannelText = ctrlText (uiNamespace getVariable [QGVAR(currentChannelControl), controlNull]);
|
||||||
|
uiNamespace setVariable [QGVAR(currentChannel), _localizedChannelText];
|
||||||
|
};
|
||||||
}] call BIS_fnc_addStackedEventhandler;
|
}] call BIS_fnc_addStackedEventhandler;
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Nothing
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [5, [], {Hint "Finished!"}, {hint "Failure!"}, "My Title"] call ace_common_fnc_progressBar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
@ -32,6 +35,16 @@ closeDialog 0;
|
|||||||
createDialog QGVAR(ProgressBar_Dialog);
|
createDialog QGVAR(ProgressBar_Dialog);
|
||||||
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText _localizedTitle;
|
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText _localizedTitle;
|
||||||
|
|
||||||
|
if (GVAR(SettingProgressBarLocation) == 1) then {
|
||||||
|
private "_ctrlPos";
|
||||||
|
_ctrlPos = [1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2), 29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2), 38 * (((safezoneW / safezoneH) min 1.2) / 40), 0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)];
|
||||||
|
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlSetPosition _ctrlPos;
|
||||||
|
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos;
|
||||||
|
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlCommit 0;
|
||||||
|
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
_perFrameFunction = {
|
_perFrameFunction = {
|
||||||
PARAMS_2(_parameters,_pfhID);
|
PARAMS_2(_parameters,_pfhID);
|
||||||
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
|
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
terminate (missionNamespace getVariable [QGVAR(waitForAnimationHandle), scriptNull]);
|
terminate (missionNamespace getVariable [QGVAR(waitForAnimationHandle), scriptNull]);
|
||||||
|
|
||||||
GVAR(waitForAnimationHandle) = _this spawn {
|
GVAR(waitForAnimationHandle) = _this spawn {
|
||||||
waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
|
waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
|
||||||
|
|
||||||
_this call FUNC(doAnimation);
|
_this call FUNC(doAnimation);
|
||||||
};
|
};
|
||||||
|
@ -17,17 +17,17 @@ _unit setvariable ["ACE_isDead",nil,true];
|
|||||||
_unit setvariable ["ACE_isUnconscious", nil, true];
|
_unit setvariable ["ACE_isUnconscious", nil, true];
|
||||||
|
|
||||||
if (isPlayer _unit) then {
|
if (isPlayer _unit) then {
|
||||||
[true] call FUNC(setVolume_f);
|
[true] call FUNC(setVolume);
|
||||||
[false] call FUNC(disableKeyInput_f);
|
[false] call FUNC(disableKeyInput);
|
||||||
if (["ace_medical"] call FUNC(isModLoader_f)) then {
|
if (["ace_medical"] call FUNC(isModLoader)) then {
|
||||||
[false] call EFUNC(medical,effectBlackOut);
|
[false] call EFUNC(medical,effectBlackOut);
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION_F)) then {
|
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
||||||
// clear all disable user input
|
// clear all disable user input
|
||||||
{
|
{
|
||||||
[_X, false] call FUNC(setDisableUserInputStatus);
|
[_X, false] call FUNC(setDisableUserInputStatus);
|
||||||
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION_F);
|
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
/**
|
|
||||||
* fnc_revealObject_f.sqf
|
|
||||||
* @Descr: N/A
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return:
|
|
||||||
* @PublicAPI: false
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if (hasInterface) then {
|
|
||||||
player reveal (_this select 0);
|
|
||||||
};
|
|
@ -42,6 +42,6 @@ if (isPlayer _reciever) then {
|
|||||||
|
|
||||||
}foreach _content;
|
}foreach _content;
|
||||||
|
|
||||||
[_title,_content,_type] call EFUNC(gui,displayInformation);
|
[_title,_content,_type] call EFUNC(common,displayInformation);
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -41,6 +41,6 @@ if (isPlayer _reciever) then {
|
|||||||
}foreach _parameters;
|
}foreach _parameters;
|
||||||
_content = format _localizationArray;
|
_content = format _localizationArray;
|
||||||
|
|
||||||
[_title,_content,_type] call EFUNC(gui,displayMessage);
|
[_title,_content,_type] call EFUNC(common,displayMessage);
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -13,16 +13,16 @@ _id = _this select 0;
|
|||||||
_disable = _this select 1;
|
_disable = _this select 1;
|
||||||
|
|
||||||
|
|
||||||
if (isnil QGVAR(DISABLE_USER_INPUT_COLLECTION_F)) then {
|
if (isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
||||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) = [];
|
GVAR(DISABLE_USER_INPUT_COLLECTION) = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_disable) then {
|
if (_disable) then {
|
||||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) pushback _id;
|
GVAR(DISABLE_USER_INPUT_COLLECTION) pushback _id;
|
||||||
[true] call FUNC(disableUserInput);
|
[true] call FUNC(disableUserInput);
|
||||||
} else {
|
} else {
|
||||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) = GVAR(DISABLE_USER_INPUT_COLLECTION_F) - [_id];
|
GVAR(DISABLE_USER_INPUT_COLLECTION) = GVAR(DISABLE_USER_INPUT_COLLECTION) - [_id];
|
||||||
if (GVAR(DISABLE_USER_INPUT_COLLECTION_F) isEqualTo []) then {
|
if (GVAR(DISABLE_USER_INPUT_COLLECTION) isEqualTo []) then {
|
||||||
[false] call FUNC(disableUserInput);
|
[false] call FUNC(disableUserInput);
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -17,7 +17,8 @@ EXPLODE_1_PVT(_this,_optionEntry);
|
|||||||
_fnc_getValueWithType = {
|
_fnc_getValueWithType = {
|
||||||
EXPLODE_2_PVT(_this,_optionEntry,_typeName);
|
EXPLODE_2_PVT(_this,_optionEntry,_typeName);
|
||||||
|
|
||||||
_value = getNumber (_optionEntry >> "value");
|
_valueConfig = (_optionEntry >> "value");
|
||||||
|
_value = if (isNumber (_optionEntry >> "value")) then {getNumber (_optionEntry >> "value")} else {0};
|
||||||
TRACE_3("_fnc_getValueWithType:", configName _optionEntry, _typeName, _value);
|
TRACE_3("_fnc_getValueWithType:", configName _optionEntry, _typeName, _value);
|
||||||
if (_typeName == "BOOL") exitWith {
|
if (_typeName == "BOOL") exitWith {
|
||||||
_value > 0
|
_value > 0
|
||||||
|
59
addons/common/functions/fnc_setVariablePublic.sqf
Normal file
59
addons/common/functions/fnc_setVariablePublic.sqf
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
*
|
||||||
|
* Sets a public variable, but wait a certain amount of time to transfer the value over the network. Changing the value by calling this function again resets the windup timer.
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: Object the variable should be assigned to (Object)
|
||||||
|
* 1: Name of the variable (String)
|
||||||
|
* 2: Value of the variable (Any)
|
||||||
|
* 3: Windup time (Number, optional. Default: 1)
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* Nothing.
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_object", "_varName", "_value", "_sync"];
|
||||||
|
|
||||||
|
_object = _this select 0;
|
||||||
|
_varName = _this select 1;
|
||||||
|
_value = _this select 2;
|
||||||
|
_sync = _this select 3;
|
||||||
|
|
||||||
|
if (isNil "_sync") then {
|
||||||
|
_sync = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
// set value locally
|
||||||
|
_object setVariable [_varName, _value];
|
||||||
|
|
||||||
|
// "duh"
|
||||||
|
if (!isMultiplayer) exitWith {};
|
||||||
|
|
||||||
|
// generate stacked eventhandler id
|
||||||
|
private "_idName";
|
||||||
|
_idName = format ["ACE_setVariablePublic_%1", _varName];
|
||||||
|
|
||||||
|
// exit now if an eh for that variable already exists
|
||||||
|
private "_allIdNames";
|
||||||
|
_allIdNames = [GETMVAR(BIS_stackedEventHandlers_onEachFrame,[]), {_this select 0}] call FUNC(map);
|
||||||
|
|
||||||
|
if (_idName in _allIdNames) exitWith {};
|
||||||
|
|
||||||
|
// when to push the value
|
||||||
|
private "_syncTime";
|
||||||
|
_syncTime = diag_tickTime + _sync;
|
||||||
|
|
||||||
|
// add eventhandler
|
||||||
|
[_idName, "onEachFrame", {
|
||||||
|
// wait to sync the variable
|
||||||
|
if (diag_tickTime > _this select 2) then {
|
||||||
|
// set value public
|
||||||
|
(_this select 0) setVariable [_this select 1, (_this select 0) getVariable (_this select 1), true];
|
||||||
|
|
||||||
|
// remove eventhandler
|
||||||
|
[_this select 3, "onEachFrame"] call BIS_fnc_removeStackedEventHandler
|
||||||
|
};
|
||||||
|
}, [_object, _varName, _syncTime, _idName]] call BIS_fnc_addStackedEventHandler;
|
||||||
|
nil
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user