setFlagOwner: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *(arg|eff|mp|serverExec|gr[0-9]) *= *(.*) * *\|([^=0-9]{12})" to "|$1=$2 |descr=$3")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| ofp
|game1= ofp
|1.00
|version1= 1.00


|game2= ofpe
|game2= ofpe
Line 31: Line 31:
|descr= Sets flag owner. When owner is set to [[objNull]] or any object other than a unit of class [[Models_%26_Classnames:_CfgVehicles_-_Class_Man|man]] or [[Game_Logic|logic]], flag is returned to the flagpole. A flag owned by a logic has no visual representation.
|descr= Sets flag owner. When owner is set to [[objNull]] or any object other than a unit of class [[Models_%26_Classnames:_CfgVehicles_-_Class_Man|man]] or [[Game_Logic|logic]], flag is returned to the flagpole. A flag owned by a logic has no visual representation.


|s1= flag '''setFlagOwner''' owner
|s1= flag [[setFlagOwner]] owner


|p1= flag: [[Object]]
|p1= flag: [[Object]]
Line 37: Line 37:
|p2= owner: [[Object]]
|p2= owner: [[Object]]


|r1=[[Nothing]]
|r1= [[Nothing]]


|x1= <code>_flag1 [[setFlagOwner]] _soldier1;</code>
|x1= <sqf>_flag1 setFlagOwner _soldier1;</sqf>


|x2= To return the flag back to the flag pole:<code>//Method 1: (set owner null)
|x2= To return the flag back to the flag pole:
[[flag]] _flagCarrier [[setFlagOwner]] [[objNull]];
<sqf>
//Method 1: (set owner null)
flag _flagCarrier setFlagOwner objNull;
//Method 2: (set the flag mast as the owner)
//Method 2: (set the flag mast as the owner)
[[flag]] _flagCarrier [[setFlagOwner]] [[flag]] _flagCarrier;</code>
flag _flagCarrier setFlagOwner flag _flagCarrier;
</sqf>


|seealso= [[flag]], [[flagOwner]], [[setFlagSide]], [[setFlagTexture]], [[flagSide]], [[flagTexture]], [[forceFlagTexture]], [[getForcedFlagTexture]], [[Flag Textures]]
|seealso= [[flag]] [[flagOwner]] [[setFlagSide]] [[setFlagTexture]] [[flagSide]] [[flagTexture]] [[forceFlagTexture]] [[getForcedFlagTexture]] [[:Category:Flag Textures|Flag Textures]]
}}
}}


Line 55: Line 58:


</dl>
</dl>
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 19:43, 3 September 2024

Hover & click on the images for description

Description

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.
Groups:
FlagsObject Manipulation

Syntax

Syntax:
flag setFlagOwner owner
Parameters:
flag: Object
owner: Object
Return Value:
Nothing

Examples

Example 1:
_flag1 setFlagOwner _soldier1;
Example 2:
To return the flag back to the flag pole:
//Method 1: (set owner null) flag _flagCarrier setFlagOwner objNull; //Method 2: (set the flag mast as the owner) flag _flagCarrier setFlagOwner flag _flagCarrier;

Additional Information

See also:
flag flagOwner setFlagSide setFlagTexture flagSide flagTexture forceFlagTexture getForcedFlagTexture Flag Textures

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Bdfy
Since flags can not be owned by vehicles, use "flag setFlagOwner driver tank1" or "flag1 setFlagOwner tank1D" to assign the flag to the vehicle's driver. The second method will only work if tank1 is the name of a unit, not a variable refering to it. True for OFP&Arma