setFlagOwner: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
m (Text replacement - "Flag Textures" to "Flag Textures")
 
(55 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.00


|1.00|= Game version
|game2= ofpe
|version2= 1.00


|arg= global |= Arguments in MP
|game3= arma1
|version3= 1.00


|eff= global |= Effects in MP
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| 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
|game5= arma2oa
____________________________________________________________________________________________
|version5= 1.50


| flag '''setFlagOwner''' owner |= Syntax
|game6= tkoh
|version6= 1.00


|p1= flag: [[Object]] |= Parameter 1
|game7= arma3
|version7= 0.50


|p2= owner: [[Object]] |= Parameter 2
|arg= global


| [[Nothing]] |= Return value
|eff= global
____________________________________________________________________________________________
 
|x1= <code>_flag1 [[setFlagOwner]] _soldier1;</code> |= Example 1


|x2= To return the flag back to the flag pole:<code>//Method 1: (set owner null)
|gr1= Flags
[[flag]] _flagCarrier [[setFlagOwner]] [[objNull]];
|gr2= Object Manipulation
 
|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
 
|p1= flag: [[Object]]
 
|p2= owner: [[Object]]
 
|r1= [[Nothing]]
 
|x1= <sqf>_flag1 setFlagOwner _soldier1;</sqf>
 
|x2= To return the flag back to the flag pole:
<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> |= Example 1
flag _flagCarrier setFlagOwner flag _flagCarrier;</sqf>
____________________________________________________________________________________________
 
| [[flag]], [[flagOwner]], [[setFlagSide]], [[setFlagTexture]], [[flagSide]], [[flagTexture]], [[forceFlagTexture]], [[getForcedFlagTexture]], [[Flag Textures]] |= See also


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


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<dt class="note">[[User:Bdfy|Bdfy]]</dt>
<dt class="note">'''[[User:Bdfy|Bdfy]]'''
<dd class="note">
<dd class="note">
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
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
<!-- Note Section END -->


</dl>
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|SETFLAGOWNER]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|SETFLAGOWNER]]
[[Category:Scripting Commands OFP 1.46|SETFLAGOWNER]]
[[Category:Scripting Commands ArmA|SETFLAGOWNER]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:27, 23 March 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