setFlagOwner: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofp |Game name=
| ofp


|1.00|Game version=
|1.00


|arg= global |Multiplayer Arguments=
|arg= global


|eff= global |Multiplayer Effects=
|eff= global


|gr1= Flags |GROUP1=
|gr1= Flags
|gr2= Object Manipulation |GROUP2=
|gr2= Object Manipulation


| 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.|DESCRIPTION=
| 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.


| flag '''setFlagOwner''' owner |SYNTAX=
| flag '''setFlagOwner''' owner


|p1= flag: [[Object]] |PARAMETER1=
|p1= flag: [[Object]]


|p2= owner: [[Object]] |PARAMETER2=
|p2= owner: [[Object]]


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]
   
   
|x1= <code>_flag1 [[setFlagOwner]] _soldier1;</code> |EXAMPLE1=
|x1= <code>_flag1 [[setFlagOwner]] _soldier1;</code>


|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:<code>//Method 1: (set owner null)
[[flag]] _flagCarrier [[setFlagOwner]] [[objNull]];
[[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> |EXAMPLE2=
[[flag]] _flagCarrier [[setFlagOwner]] [[flag]] _flagCarrier;</code>


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



Revision as of 12:12, 18 January 2021

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:
flagflagOwnersetFlagSidesetFlagTextureflagSideflagTextureforceFlagTexturegetForcedFlagTextureFlag 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

Notes

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