mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Implement new cook off SFX (#5179)
* Implement new cook off SFX with variants * Add hybrid V to authors
This commit is contained in:
parent
5b9c70a738
commit
ae69118fba
@ -1,4 +1,4 @@
|
||||
# ACE3 CONTRIBUTOR LIST
|
||||
# ACE3 CONTRIBUTOR LIST
|
||||
# If you contributed, but are not listed here, contact me:
|
||||
# koffeinflummi@gmail.com
|
||||
#
|
||||
@ -84,6 +84,7 @@ Harakhti <shadowdragonphd@gmail.com>
|
||||
havena <silveredenis@gmail.com>
|
||||
Hawkins
|
||||
Head <brobergsebastian@gmail.com>
|
||||
Hybrid V
|
||||
Karneck <dschultz26@hotmail.com>
|
||||
Kavinsky <nmunozfernandez@gmail.com>
|
||||
Kllrt <kllrtik@gmail.com>
|
||||
|
@ -2,8 +2,12 @@
|
||||
class CfgSFX {
|
||||
class GVAR(CookOff) {
|
||||
name = QGVAR(cookoff);
|
||||
sounds[] = {QGVAR(cookoff)};
|
||||
GVAR(cookoff)[] = {PATHTOF(sounds\cookoff.wss),6,1.8,400,1,0,0,0};
|
||||
// Index 4 is percentage chance to play, in theory high pressure is way more likely
|
||||
variant0[] = {PATHTOF(sounds\cookoff_low_pressure.ogg),6,1,400,0.1,0,0,0};
|
||||
variant1[] = {PATHTOF(sounds\cookoff_mid_pressure.ogg),6,1,400,0.25,0,0,0};
|
||||
variant2[] = {PATHTOF(sounds\cookoff_high_pressure.ogg),6,1,400,0.65,0,0,0};
|
||||
sounds[] = {"variant0","variant1","variant2"};
|
||||
titles[] = {};
|
||||
empty[] = {"",0,0,0,0,0,0,0};
|
||||
};
|
||||
};
|
||||
|
@ -91,6 +91,7 @@ if (local _vehicle) then {
|
||||
} forEach _positions;
|
||||
|
||||
if (isServer) then {
|
||||
// TODO - Players in the vehicle hear no sound (even after exiting the vehicle)
|
||||
private _sound = createSoundSource [QGVAR(Sound), position _vehicle, [], 0];
|
||||
|
||||
_effects pushBack _sound;
|
||||
@ -107,11 +108,12 @@ if (local _vehicle) then {
|
||||
DEC(_counter);
|
||||
|
||||
if (_counter > 0) then {
|
||||
[_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], 0.4] call CBA_fnc_waitAndExecute
|
||||
[_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], FLAME_EFFECT_DELAY] call CBA_fnc_waitAndExecute
|
||||
};
|
||||
};
|
||||
|
||||
[_vehicle, _fnc_FlameEffect, 12] call _fnc_FlameEffect; // recursive function
|
||||
// Recursive function, occurs for duration of cookoff
|
||||
[_vehicle, _fnc_FlameEffect, ceil(COOKOFF_TIME/FLAME_EFFECT_DELAY)] call _fnc_FlameEffect;
|
||||
|
||||
private _randomPosition = _vehicle getPos [100, random 360];
|
||||
|
||||
@ -132,6 +134,6 @@ if (local _vehicle) then {
|
||||
if (local _vehicle) then {
|
||||
_vehicle setDamage 1;
|
||||
};
|
||||
}, [_vehicle, _effects], 14] call CBA_fnc_waitAndExecute;
|
||||
}, [_vehicle, _effects, _positions], 10.5] call CBA_fnc_waitAndExecute;
|
||||
}, _vehicle, 3] call CBA_fnc_waitAndExecute;
|
||||
}, [_vehicle, _effects], COOKOFF_TIME] call CBA_fnc_waitAndExecute; // TODO: Randomise cook off time with locality in mind
|
||||
}, [_vehicle, _effects, _positions], SMOKE_TIME] call CBA_fnc_waitAndExecute;
|
||||
}, _vehicle, IGNITE_TIME] call CBA_fnc_waitAndExecute;
|
||||
|
@ -71,6 +71,6 @@ if (local _box) then {
|
||||
if (local _box) then {
|
||||
_box setDamage 1;
|
||||
};
|
||||
}, [_box, _effects], 82.5] call CBA_fnc_waitAndExecute; // Give signifcant time for ammo cookoff to occur (perhaps keep the box alive until all cooked off?)
|
||||
}, [_box, _effects], 10.5] call CBA_fnc_waitAndExecute;
|
||||
}, _box, 3] call CBA_fnc_waitAndExecute;
|
||||
}, [_box, _effects], COOKOFF_TIME_BOX] call CBA_fnc_waitAndExecute; // TODO: Change so that box is alive until no ammo left, with locality in mind
|
||||
}, [_box, _effects], SMOKE_TIME] call CBA_fnc_waitAndExecute;
|
||||
}, _box, IGNITE_TIME] call CBA_fnc_waitAndExecute;
|
||||
|
@ -17,3 +17,13 @@
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define IS_EXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") > 0.5)
|
||||
|
||||
// Stages of cookoff in order (in seconds)
|
||||
// Should be no un-synced randomness in these as the effects must be ran on each client
|
||||
#define IGNITE_TIME 3
|
||||
#define SMOKE_TIME 10.5
|
||||
#define COOKOFF_TIME 14 // Cook off time should be 20s at most due to length of sound files
|
||||
#define COOKOFF_TIME_BOX 82.5 // Cook off time for boxes should be significant to allow time for ammo to burn
|
||||
|
||||
// Delay between flame effect for players in a cooking off vehicle
|
||||
#define FLAME_EFFECT_DELAY 0.4
|
||||
|
Binary file not shown.
BIN
addons/cookoff/sounds/cookoff_high_pressure.ogg
Normal file
BIN
addons/cookoff/sounds/cookoff_high_pressure.ogg
Normal file
Binary file not shown.
BIN
addons/cookoff/sounds/cookoff_low_pressure.ogg
Normal file
BIN
addons/cookoff/sounds/cookoff_low_pressure.ogg
Normal file
Binary file not shown.
BIN
addons/cookoff/sounds/cookoff_mid_pressure.ogg
Normal file
BIN
addons/cookoff/sounds/cookoff_mid_pressure.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user