BIS fnc sideColor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Changed description of output value)
m (Fix category, description and example)
Line 2: Line 2:
____________________________________________________________________________________________
____________________________________________________________________________________________


|Arma3|= Game
| arma3 |= Game


|1.00|= Game Version (number surrounded by NO SPACES)
|1.00|= Game Version
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [Side, Output] [[call]] '''BIS_fnc_sideColor'''; |= Syntax
| [side, returnString] call [[BIS_fnc_sideColor]]; |= Syntax


| [[Array]] or [[String]] - Colour in RGBA or colour name |= RETURNVALUE
| [[Array]] or [[String]] - Colour in RGBA or colour name |= Return value


|p1= [[Side]] - Side |= Parameter 1
|p1= side: [[Side]] |= Parameter 1


|p2= [[Bool]] - Output (Optional)<br>[[false]] (Default): [R,G,B,A]<br>[[true]] - "ColourName"|= Parameter 2
|p2= returnString: [[Bool]] - (Optional, default false) wanted output: [[false]]: [R,G,B,A], [[true]]: "ColourName" |= Parameter 2


____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>
|x1= <code><nowiki>[</nowiki>[[blufor]], [[false]]] [[call]] [[BIS_fnc_sideColor]]; {{codecomment|// Returns [0,0.3,0.6,1]}}</code> |= Example 1
[ [[west]], [[false]] ] [[call]] '''BIS_fnc_sideColor''';//Returns [0,0.3,0.6,1]
</code> |= Example 1


 
|x2= <code><nowiki>[</nowiki>[[blufor]], &nbsp;[[true]]] [[call]] [[BIS_fnc_sideColor]]; {{codecomment|// Returns "ColorWEST"}}</code> |= Example 2
|x2= <code>
[ [[west]], [[true]] ] [[call]] '''BIS_fnc_sideColor''';//Returns "ColorWEST"
</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[side]],[[CfgMarkerColors Arma 3]] |= See Also
| [[side]], [[CfgMarkerColors Arma 3]] |= See Also
 
}}
}}


<dl class="command_description">
<dl class="command_description">
<!-- BEGIN Note Section -->
<!-- BEGIN Note Section -->
<!-- For example:
 
<dd class="notedate">Posted on Month Day, Year - Time (UTC)</dd>
<dt class="note">'''[[User:User Name|User Name]]'''</dt>
<dd class="note">This is an example note. It is true and verifiable, and contains a little code snippet.
<code>[[if]] ([[_this]] == anExample) [[then]] { [[hint]] "Leave it here for others to read"; };</code></dd>
-->
<!-- END Note Section -->
<!-- END Note Section -->
</dl>
</dl>


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
<!-- Appropriate categories go here -->
[[Category:Arma 3: Functions|{{uc:sideColor}}]]
[[Category:Arma 3: Functions|{{uc:{{PAGENAME}}}}]]

Revision as of 18:16, 21 April 2018

Hover & click on the images for description

Description

Description:
Returns colour of define side either as Array in format RGBA or the name of the colour as String
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[side, returnString] call BIS_fnc_sideColor;
Parameters:
side: Side
returnString: Bool - (Optional, default false) wanted output: false: [R,G,B,A], true: "ColourName"
Return Value:
Array or String - Colour in RGBA or colour name

Examples

Example 1:
[blufor, false] call BIS_fnc_sideColor; // Returns [0,0.3,0.6,1]
Example 2:
[blufor,  true] call BIS_fnc_sideColor; // Returns "ColorWEST"

Additional Information

See also:
sideCfgMarkerColors Arma 3

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

Bottom Section