setFlagTexture: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(49 intermediate revisions by 4 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


|eff= global|= Effects in MP
|game3= arma1
|version3= 1.00


|arg= local|= Effects in MP
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| Set flag texture.
|game5= arma2oa
|version5= 1.50


If texture is "", flag is not drawn.<br>
|game6= tkoh
Custom texture can be used, as long as it is in *.jpg format, and has dimensions of 200px*200px.<br>
|version6= 1.00
The page [[Flag Textures]] shows which textures are available in each game.


NOTE: In MP this command has to be executed where Flag Pole is [[local]]. If you add Flag Pole in the editor, it will be local to the server, so executing [[setFlagTexture]] on the server will change flag texture on all clients. The command is also persistent and is synchronised for [[Join In Progress|JIP]] clients.|= Description
|game7= arma3
____________________________________________________________________________________________
|version7= 0.50


| flag '''setFlagTexture''' texture |= Syntax
|arg= local


|p1= flag: [[Object]] |= Parameter 1
|eff= global


|p2= texture: [[String]] |= Parameter 2
|gr1= Flags


| [[Nothing]] |= Return value
|descr= Sets flag texture.
____________________________________________________________________________________________
 
|x1= <code>_flagE [[setFlagTexture]] "\ca\misc\data\sever_vlajka.paa";</code> |= Example 1
|x2= <code>_flagW [[setFlagTexture]] "\ca\misc\data\usa_vlajka.paa";</code> |= Example 2
|x3= <code>flag1 [[setFlagTexture]] "\A3\Data_F\Flags\Flag_red_CO.paa";</code> |= Example 3
____________________________________________________________________________________________


| [[Flag Textures]], [[flag]], [[flagOwner]], [[setFlagOwner]], [[setFlagSide]], [[setObjectTexture]], [[setObjectTextureGlobal]] |= See also
|s1= flag [[setFlagTexture]] texture


}}
|p1= flag: [[Object]] - a flag pole
 
|p2= texture: [[String]] - flag texture. If texture is {{hl|""}}, flag is not drawn. Custom texture can be used:
* Prior {{arma3}}: Dimension 200x200, file extension .jpg
* Since {{arma3}}: Dimension 512×256, file extension .paa
 
|r1= [[Nothing]]
 
|x1= <sqf>_flagE setFlagTexture "\ca\misc\data\sever_vlajka.paa";</sqf>


<h3 style="display:none">Notes</h3>
|x2= <sqf>_flagW setFlagTexture "\ca\misc\data\usa_vlajka.paa";</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


|x3= <sqf>flag1 setFlagTexture "\A3\Data_F\Flags\Flag_red_CO.paa";</sqf>


<!-- Note Section END -->
|x4= <sqf>_customFlag setFlagTexture "myMissionFlag.paa";</sqf>
</dl>


[[Category:Scripting Commands|SETFLAGTEXTURE]]
|x5= <sqf>_flag_Arma_3 setFlagTexture "\a3\ui_f\data\Logos\arma3_expansion_ca.paa";</sqf>
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|SETFLAGTEXTURE]]
[[Category:Scripting Commands OFP 1.46|SETFLAGTEXTURE]]
[[Category:Scripting Commands ArmA|SETFLAGTEXTURE]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
|x6= Capturable OPFOR flag:
<dl class="command_description">
<sqf>
<dd class="notedate">Posted on November 23, 2014 - 20:56 (UTC)</dd>
private _flag = "FlagPole_F" createVehicle position player;
<dt class="note">[[User:James|James]]</dt>
_flag setFlagTexture "\A3\Data_F\Flags\Flag_CSAT_CO.paa";
<dd class="note">
_flag setFlagSide east;
Be very carful on MP servers with own textures. It seems that it is not enough to run local on server (e.g. via BIS_fnc_MP with [..,..,false,false]). Flags that are already in the game are no problem. But own textures (not important wether .jpg or .paa, I always prefer .jpg because they are much smaller) ONLY work when the mission is compressed into .'''pbo'''. That is important because many mission makers share and upload their missions as folders. Normally, that is no problem and works quite well, but in this special case, the server is not able to find the particular texture that is placed within a folder in the mission. That only works when mission is presented as .pbo.
</sqf>


Failure: Warning Message: Cannot load texture mpmissions\v_02_[i_zg]uebungskarte.altis\pics\flags\flagge_aut.jpg.
|seealso= [[flag]] [[flagOwner]] [[setFlagOwner]] [[setFlagSide]] [[setObjectTexture]] [[setObjectTextureGlobal]] [[flagSide]] [[flagTexture]] [[setFlagAnimationPhase]] [[flagAnimationPhase]] [[forceFlagTexture]] [[getForcedFlagTexture]]
This you will get if mission is not uploaded as .pbo.
}}
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 14:16, 11 April 2022

Hover & click on the images for description

Description

Description:
Sets flag texture.
Groups:
Flags

Syntax

Syntax:
flag setFlagTexture texture
Parameters:
flag: Object - a flag pole
texture: String - flag texture. If texture is "", flag is not drawn. Custom texture can be used:
  • Prior Arma 3: Dimension 200x200, file extension .jpg
  • Since Arma 3: Dimension 512×256, file extension .paa
Return Value:
Nothing

Examples

Example 1:
_flagE setFlagTexture "\ca\misc\data\sever_vlajka.paa";
Example 2:
_flagW setFlagTexture "\ca\misc\data\usa_vlajka.paa";
Example 3:
flag1 setFlagTexture "\A3\Data_F\Flags\Flag_red_CO.paa";
Example 4:
_customFlag setFlagTexture "myMissionFlag.paa";
Example 5:
_flag_Arma_3 setFlagTexture "\a3\ui_f\data\Logos\arma3_expansion_ca.paa";
Example 6:
Capturable OPFOR flag:
private _flag = "FlagPole_F" createVehicle position player; _flag setFlagTexture "\A3\Data_F\Flags\Flag_CSAT_CO.paa"; _flag setFlagSide east;

Additional Information

See also:
flag flagOwner setFlagOwner setFlagSide setObjectTexture setObjectTextureGlobal flagSide flagTexture setFlagAnimationPhase flagAnimationPhase forceFlagTexture getForcedFlagTexture

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