{"name":"engineOn","title":"engineOn","type":"command","url":"https://community.bistudio.com/wiki/engineOn","revid":337565,"updated":"2023-02-10T01:12:53Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.90","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.90","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Activates and deactivates the engine of a vehicle.","syntaxes":[{"syntax":"vehicle engineOn state","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"state","type":"Boolean","description":"true to turn the engine on, false to turn it off","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"state"}}],"examples":[{"code":["if (!isEngineOn _jeep) then { _jeep engineOn true; };"]},{"code":["waitUntil { player == driver _jeep; };\nvehicle player engineOn true;"]}],"multiplayer":"Executed on a remote vehicle this command may turn the engine on but then it will get turned off by itself after a short while.","see_also":["isEngineOn"],"notes":[{"user":"Benargee","date":"2014-08-25T22:27:00Z","text":"To switch engine off can also use setFuel and fuel:\n\n```sqf\nprivate \"_gas\";\n_gas = fuel heli;\nheli setFuel 0;\nsleep 0.01;\nheli setFuel _gas;\n```\n\nAlso sets helicopter fuel back to original quantity. Works on every other vehicle."}]}