Page MenuHomeFeedback Tracker

setVehicleThrottle does not work immediately after a moveInDriver command
New, NormalPublic

Description

For some reason you need a small delay (0.001) in order for setVehicleThrottle to work after doing a moveInDriver command.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
1909
Category
Scripting
Steps To Reproduce

create a mission and add a soldier in open area
run these commands in your console:

player moveInDriver ('B_Plane_Fighter_01_F' createVehicle getPos player);
vehicle player setAirplaneThrottle .7;
Additional Information

expected results:
airplane should be at 70% throttle

actual results:
airplane is at 0% throttle

notes:
This code works:

player moveInDriver ('B_Plane_Fighter_01_F' createVehicle getPos player);
[] spawn {sleep 0.001; vehicle player setAirplaneThrottle .7};

This code without sleep does not work:

player moveInDriver ('B_Plane_Fighter_01_F' createVehicle getPos player);
[] spawn {vehicle player setAirplaneThrottle .7};

Event Timeline

Zectbumo created this task.Jan 4 2020, 10:49 AM

works for me without delay