{"name":"setFlagOwner","operator":null,"title":"setFlagOwner","type":"command","url":"https://community.bistudio.com/wiki/setFlagOwner","revid":369375,"updated":"2024-09-03T18:43:13Z","groups":["Flags","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":"global","server_exec":false},"exec":null,"description":"Sets flag owner. When owner is set to objNull or any object other than a unit of class man or logic, flag is returned to the flagpole. A flag owned by a logic has no visual representation.","syntaxes":[{"syntax":"flag setFlagOwner owner","since":null,"effect":null,"exec":null,"params":[{"name":"flag","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"flag: Object"},{"name":"owner","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"owner: Object"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"flag","types":["Object"]},"right":{"text":"owner","types":["Object"]}}],"examples":[{"text":"```sqf\n_flag1 setFlagOwner _soldier1;\n```","code":["_flag1 setFlagOwner _soldier1;"]},{"text":"To return the flag back to the flag pole:\n\n```sqf\n//Method 1: (set owner null)\nflag _flagCarrier setFlagOwner objNull;\n//Method 2: (set the flag mast as the owner)\nflag _flagCarrier setFlagOwner flag _flagCarrier;\n```","code":["//Method 1: (set owner null)\nflag _flagCarrier setFlagOwner objNull;\n//Method 2: (set the flag mast as the owner)\nflag _flagCarrier setFlagOwner flag _flagCarrier;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["flag","flagOwner","setFlagSide","setFlagTexture","flagSide","flagTexture","forceFlagTexture","getForcedFlagTexture"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Flags","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","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}