mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fa6da1ae7c
* Add configurable engine startup delay * add suggested change Add space char Co-authored-by: Dystopian <sddex@ya.ru> * Squashed commit of the following: commit 14f5483d8fa49d36effa8b18a3df392ed39b19da Author: Serg Vergun <1197314+severgun@users.noreply.github.com> Date: Fri Jul 23 20:23:52 2021 +0300 Add 0 cap and update docs commit e3ce7f273882b3f4e2cba916c39b506f857b20db Author: severgun <sewergun@gmail.com> Date: Fri Jul 23 12:42:42 2021 +0300 add parentheses commit b36eedc61b5e6bb868c37901bd4191767fbdaff8 Author: severgun <sewergun@gmail.com> Date: Fri Jul 23 12:34:30 2021 +0300 Add ability to set engine startup delay per vehicle by script * Change function name * add suggested exitWith condition Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Update docs/wiki/framework/vehicles-framework.md Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: Dystopian <sddex@ya.ru> Co-authored-by: PabstMirror <pabstmirror@gmail.com>
23 lines
491 B
Plaintext
23 lines
491 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: severgun
|
|
* Set engine startup delay to specific vehicle.
|
|
*
|
|
* Arguments:
|
|
* 0: Vehicle <OBJECT>
|
|
* 1: Delay (seconds) <NUMBER>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [hemmt, 3.2] call ace_vehicles_fnc_setVehicleStartDelay
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params [["_veh", objNull, [objNull]], ["_delay", 0, [99]]];
|
|
|
|
if (isNull _veh || {!(_veh isKindOf "AllVehicles")}) exitWith {};
|
|
|
|
_veh setVariable [QGVAR(engineStartDelay), _delay max 0, true]; |