flag: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "Flag Textures" to "Flag Textures")
 
(63 intermediate revisions by 16 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands]]
{{RV|type=command
[[Category:Scripting Commands OFP 1.97]]
[[Category:Scripting Commands OFP 1.46]]
[[Category:Scripting Commands ArmA]]


back to [[Scripting_Reference#F|COMREF]]
|game1= ofp
|version1= 1.00


<h2 style="color:#000066">'''flag ''unit'''''</h2>
|game2= ofpe
|version2= 1.00


|game3= arma1
|version3= 1.00


'''Operand types:'''
|game4= arma2
|version4= 1.00


'''unit:''' [[Object]]
|game5= arma2oa
|version5= 1.50


'''Type of returned value:'''
|game6= tkoh
|version6= 1.00


[[Object]]
|game7= arma3
|version7= 0.50


'''Description:'''
|arg= global


If unit has a flag, flag is returned.
|gr1= Flags


If not, [[ObjNull]] is returned.
|descr= Returns the original flag pole of the flag the unit is carrying.


|s1= [[flag]] unit


'''Example:'''
|p1= unit: [[Object]]


_flutter = '''flag''' [[player]]
|r1= [[Object]] - flag pole object the flag belongs to. If the unit carries no flag, [[objNull]] is returned.
 
|x1= <sqf>_flag = flag _soldier;</sqf>
 
|seealso= [[flagOwner]] [[setFlagOwner]] [[setFlagSide]] [[setFlagTexture]] [[flagSide]] [[flagTexture]] [[setFlagAnimationPhase]] [[flagAnimationPhase]] [[forceFlagTexture]] [[getForcedFlagTexture]] [[:Category:Flag Textures|Flag Textures]]
}}

Latest revision as of 15:27, 23 March 2024

Hover & click on the images for description

Description

Description:
Returns the original flag pole of the flag the unit is carrying.
Groups:
Flags

Syntax

Syntax:
flag unit
Parameters:
unit: Object
Return Value:
Object - flag pole object the flag belongs to. If the unit carries no flag, objNull is returned.

Examples

Example 1:
_flag = flag _soldier;

Additional Information

See also:
flagOwner setFlagOwner setFlagSide setFlagTexture flagSide flagTexture setFlagAnimationPhase flagAnimationPhase 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