{"name":"engineOn","operator":null,"title":"engineOn","type":"command","url":"https://community.bistudio.com/wiki/engineOn","revid":337565,"updated":"2023-02-10T01:12:53Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.90"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.90"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"description":"Activates and deactivates the engine of a vehicle.","syntaxes":[{"syntax":"vehicle engineOn state","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicle: Object"},{"name":"state","type":"Boolean","optional":false,"default":null,"description":"true to turn the engine on, false to turn it off","types":["Boolean"],"since":null,"text":"state: Boolean - true to turn the engine on, false to turn it off"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"state","types":["Boolean"]}}],"examples":[{"text":"```sqf\nif (!isEngineOn _jeep) then { _jeep engineOn true; };\n```","code":["if (!isEngineOn _jeep) then { _jeep engineOn true; };"]},{"text":"```sqf\nwaitUntil { player == driver _jeep; };\nvehicle player engineOn true;\n```","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.","problems":null,"aliases":[],"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."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Operation Flashpoint version 1.90","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}