{"name":"commander","operator":null,"title":"commander","type":"command","url":"https://community.bistudio.com/wiki/commander","revid":363370,"updated":"2024-03-28T10:39:29Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"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.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"In Operation Flashpoint it returns the commander of a vehicle. Since Armed Assault it returns the primary observer. The commander of a vehicle can be found with effectiveCommander.","syntaxes":[{"syntax":"commander vehicle","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"vehicle","types":["Object"],"since":null,"text":"vehicle: Object - vehicle"}],"returns":{"type":"Object","types":["Object"],"description":"the unit sitting in the commander place is returned. If vehicle is not a vehicle but a person, the person is returned.","text":"Object - the unit sitting in the commander place is returned. If vehicle is not a vehicle but a person, the person is returned."},"form":"unary","operator":null,"left":null,"right":{"text":"vehicle","types":["Object"]}}],"examples":[{"text":"```sqf\nmoveOut commander _tank;\n```","code":["moveOut commander _tank;"]},{"text":"Detect if player is in commander turret of a vehicle:\n\n```sqf\n_isVehicleCommander = player isEqualTo commander objectParent player;\n```","code":["_isVehicleCommander = player isEqualTo commander objectParent player;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["driver","gunner","crew","currentPilot","effectiveCommander"],"notes":[],"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.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}