setAttributes: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting_Commands_Take_On_Helicopters" to "[[Category:Scripting Commands Take On Helicopters")
m (Text replacement - "[[Category:Scripting Commands ArmA|" to "[[Category:Scripting Commands Armed Assault|")
Line 40: Line 40:
[[Category:Scripting Commands|SETATTRIBUTES]]
[[Category:Scripting Commands|SETATTRIBUTES]]
[[Category:Scripting Commands OFP Elite |SETATTRIBUTES]]
[[Category:Scripting Commands OFP Elite |SETATTRIBUTES]]
[[Category:Scripting Commands ArmA|SETATTRIBUTES]]
[[Category:Scripting Commands Armed Assault|SETATTRIBUTES]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Revision as of 19:45, 3 June 2020

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Returns a Structured Text created from the given structured text and sets attributes to the given values.

Even though command accepts plain String too, the argument should be Structured Text in order for the set attributes to have an effect. Additionally the result of the command should be fed to composeText (See Example 1) or formatText
Groups:
Uncategorised

Syntax

Syntax:
text setAttributes [name1, value1, name2, value2, ...]
Parameters:
text: String or Structured Text - only passing Structured Text has any effect
[name1, value1, name2, value2, ...]: Array
name: String - name of the attribute
value: String - value of the attribute
Return Value:
Structured Text

Examples

Example 1:
_txt = text "Red text, right align"; _txt setAttributes ["color", "#ff0000", "align", "right"]; hint composeText [_txt];

Additional Information

See also:
composeTextformatTextparseTexttextctrlSetStructuredText

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

Bottom Section