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>
1.2 KiB
1.2 KiB
layout | title | description | group | order | parent | mod | version | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wiki | Vehicles Framework | Explains how to set-up vehicles startup delay. | framework | 5 | wiki | ace |
|
1. Engine startup delay
The engine has to be started before the vehicle can move. Delay can be configured per class via config or per vehicle via script. By default starting the engine takes aprox. 1 to 2 seconds.
1.1 Setting the startup delay by config
class CfgVehicles {
class MyFuelTruck {
ace_vehicles_engineStartDelay = 3; // Startup delay in seconds
};
class MyCar {
ace_vehicles_engineStartDelay = 2.2;
};
class MyElectricCar {
ace_vehicles_engineStartDelay = 0.1;
};
};
1.2 Setting the startup delay by script
ace_vehicles_fnc_setVehicleStartDelay
Has global effects.
Arguments | Type | Optional (default value) | |
---|---|---|---|
0 | Vehicle | Object | Required |
1 | Delay (in seconds) | Number | Required |
R | None | None | Return value |
1.2.1 Example
[myCar, 2.2] call ace_vehicles_fnc_setVehicleStartDelay;
Arguments | Explanation | |
---|---|---|
0 | myCar |
My car object |
1 | 2.2 |
New startup delay |