Page MenuHomeFeedback Tracker

Scripting command engineOn is unable to shut the engine of helicopters.
New, WishlistPublic

Description

engineOn works fine for vehicles, but for helicopters, it's only able to turn the engines on. chopper engineOn false; will do nothing.

Currently I'm resorting to this work-around:

MTP_fnc_engineOn =
{

private ["_vehicle", "_on"];
_vehicle = _this select 0;
_on = _this select 1;
if (!(_vehicle isKindOf "Air")) then
{
    _vehicle engineOn _on;
}
else
{
    if (_on) then
    {
        _vehicle engineOn true;
    }
    else
    {
        _vehicle spawn
        {
            private ["_vehicle"];
            _vehicle = _this;
            _fuel = fuel _vehicle;
            _vehicle setFuel 0;
            sleep 0.1;
            _vehicle setFuel _fuel;
        }
    };
};

};

Details

Legacy ID
765266300
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. Insert any helicopter.
  2. Name it chopper.
  3. Add this to its init field: player addAction ["TEST", { chopper engineOn false }];
  4. Preview.
  5. Get in the helicopter.
  6. Start it.
  7. Wait a little.
  8. Execute the "TEST" action, and notice how the engine stays on.
Additional Information

Event Timeline

MulleDK19 edited Additional Information. (Show Details)
MulleDK19 set Category to Scripting.
MulleDK19 set Reproducibility to Always.
MulleDK19 set Severity to None.
MulleDK19 set Resolution to Fixed.
MulleDK19 set Legacy ID to 765266300.May 7 2016, 1:52 PM
Bohemia added a subscriber: foxy.Apr 27 2013, 2:28 AM

Unable to reproduce. Can someone confirm this is still happening with repro?

Reproduced on stable branch 1.28.127008.

Added video.

Thank you. Could you also test this on DEV branch to confirm it has been fixed?

Unable to reproduce on development branch 1.29.127079.

It seems to be working correctly.

Ah great thanks, will marked as resolved on DEV and coming to next stable.

Stable hasn't updated