mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cookoff - Adds heating effect to cookoff (#8685)
* Adds heating effect to cookoff Makes tanks that cook-off actually heat up on IR. * Adds cbaEvent 'setTIPars' * Adds CBAEvent call in cookOff.sqf * Spaces out line. Adds proper event heading. * Moves TI event to cookOffEffect.sqf; * Update addons/cookoff/functions/fnc_cookOffEffect.sqf Co-authored-by: pterolatypus <pterolatypus@users.noreply.github.com> * Changes global event for TI pars to local command * Reverts file to before previous commits in PR. * Update addons/cookoff/functions/fnc_cookOffEffect.sqf Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com> * Update addons/cookoff/functions/fnc_cookOffEffect.sqf Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com> * Update addons/cookoff/XEH_postInit.sqf Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com> * ti params and add comments to formula Co-authored-by: pterolatypus <pterolatypus@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
This commit is contained in:
parent
459e732c6d
commit
da1c5d3b21
@ -96,7 +96,7 @@ if (_smokeDelayEnabled) then {
|
|||||||
_fireSource = selectRandom _positions;
|
_fireSource = selectRandom _positions;
|
||||||
};
|
};
|
||||||
|
|
||||||
[QGVAR(cookOffEffect), [_vehicle, true, _ring, _time, _fireSource]] call CBA_fnc_globalEvent;
|
[QGVAR(cookOffEffect), [_vehicle, true, _ring, _time, _fireSource, _intensity]] call CBA_fnc_globalEvent;
|
||||||
|
|
||||||
_intensity = _intensity - (0.5 max random 1);
|
_intensity = _intensity - (0.5 max random 1);
|
||||||
_vehicle setVariable [QGVAR(intensity), _intensity];
|
_vehicle setVariable [QGVAR(intensity), _intensity];
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* 2: Spawn fire ring <Boolean>
|
* 2: Spawn fire ring <Boolean>
|
||||||
* 3: How long effect will last (Max 20 seconds) <Number>
|
* 3: How long effect will last (Max 20 seconds) <Number>
|
||||||
* 4: What selection will fire originate from <String>
|
* 4: What selection will fire originate from <String>
|
||||||
|
* 5: Cookoff intensity value <Number>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
@ -19,7 +20,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_obj", "_jet", "_ring", "_time", "_fireSelection"];
|
params ["_obj", "_jet", "_ring", "_time", "_fireSelection", "_intensity"];
|
||||||
private _light = "#lightpoint" createVehicleLocal [0,0,0];
|
private _light = "#lightpoint" createVehicleLocal [0,0,0];
|
||||||
_light setLightBrightness 5;
|
_light setLightBrightness 5;
|
||||||
_light setLightAmbient [0.8, 0.6, 0.2];
|
_light setLightAmbient [0.8, 0.6, 0.2];
|
||||||
@ -43,7 +44,7 @@ if (isServer) then {
|
|||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_args", "_pfh"];
|
params ["_args", "_pfh"];
|
||||||
_args params ["_obj", "_jet", "_ring", "_time", "_startTime", "_light", "_fireSelection", "_sound"];
|
_args params ["_obj", "_jet", "_ring", "_time", "_startTime", "_light", "_fireSelection", "_sound", "_intensity"];
|
||||||
private _elapsedTime = CBA_missionTime - _startTime;
|
private _elapsedTime = CBA_missionTime - _startTime;
|
||||||
if (_elapsedTime >= _time) exitWith {
|
if (_elapsedTime >= _time) exitWith {
|
||||||
deleteVehicle _light;
|
deleteVehicle _light;
|
||||||
@ -185,5 +186,14 @@ if (isServer) then {
|
|||||||
[2 + random 1], 1, 0, "", "", _obj
|
[2 + random 1], 1, 0, "", "", _obj
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}, 0, [_obj, _jet, _ring, _time, CBA_missionTime, _light, _fireSelection, _sound]] call cba_fnc_addPerFrameHandler;
|
|
||||||
|
(getVehicleTIPars _obj) params ["_tiEngine", "_tiWheels", "_tiWeapon"];
|
||||||
|
_obj setVehicleTIPars [
|
||||||
|
// formula is designed to have the temperature ramp up quickly and then level out
|
||||||
|
(_tiEngine + (_intensity * 0.01))/1.005,
|
||||||
|
(_tiWheels + (_intensity * 0.004))/1.002, // wheels//tracks are further away from burning parts
|
||||||
|
(_tiWeapon + (_intensity * 0.01))/1.005
|
||||||
|
];
|
||||||
|
|
||||||
|
}, 0, [_obj, _jet, _ring, _time, CBA_missionTime, _light, _fireSelection, _sound, _intensity]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user