setAttributes: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "| arma |" to "| arma1 |")
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Armed[ _]Assault(\|.*)]]" to "{{GameCategory|arma1|Scripting Commands}}")
Line 44: Line 44:
[[Category:Scripting Commands|SETATTRIBUTES]]
[[Category:Scripting Commands|SETATTRIBUTES]]
[[Category:Scripting Commands OFP Elite |SETATTRIBUTES]]
[[Category:Scripting Commands OFP Elite |SETATTRIBUTES]]
[[Category:Scripting Commands Armed Assault|SETATTRIBUTES]]
{{GameCategory|arma1|Scripting Commands}}
[[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 10:59, 8 January 2021

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:
StringsStructured Text

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