text: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \{\{GameCategory\|[a-z]+[0-9]?\|Scripting Commands\}\}" to "")
m (Text replacement - "\|x([0-9]) *= * <code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(20 intermediate revisions by the same user not shown)
Line 24: Line 24:
|descr= Creates a structured text containing the given plain text if argument is [[String]]. Use [[setAttributes]] to set additional [[Structured_Text#Attributes | attributes]] on the text. If the argument is [[location]], returns location's text value (see Alt Syntax).
|descr= Creates a structured text containing the given plain text if argument is [[String]]. Use [[setAttributes]] to set additional [[Structured_Text#Attributes | attributes]] on the text. If the argument is [[location]], returns location's text value (see Alt Syntax).


|s1= '''text''' string
|s1= [[text]] string


|p1= string: [[String]]
|p1= string: [[String]]
Line 30: Line 30:
|r1= [[Structured Text]]
|r1= [[Structured Text]]


|s2= '''text''' location
|s2= [[text]] location


|p21= location: [[Location]]
|p21= location: [[Location]]
Line 36: Line 36:
|r2= [[String]]
|r2= [[String]]


|x1= <code>_stxt2 = [[text]] "Hello world.";</code>
|x1= <sqf>_stxt2 = text "Hello world.";</sqf>


|x2= <code>_townName = [[text]] myTownLocation;</code>
|x2= <sqf>_townName = text myTownLocation;</sqf>


|x3= <code>_loc = [[text]] [[nearestLocation]] [<nowiki/>[[position]] [[player]], "NameMarine"]; //"Marina Bay"</code>
|x3= <sqf>_loc = text nearestLocation [position player, "NameMarine"]; //"Marina Bay"</sqf>


|seealso= [[parseText]], [[composeText]], [[image]], [[lineBreak]], [[setText]], [[createLocation]], [[deleteLocation]], [[drawLocation]], [[locationPosition]], [[locationNull]], [[nearestLocation]], [[nearestLocations]], [[nearestLocationWithDubbing]], [[name]]
|seealso= [[parseText]] [[composeText]] [[image]] [[lineBreak]] [[setText]] [[createLocation]] [[deleteLocation]] [[drawLocation]] [[locationPosition]] [[locationNull]] [[nearestLocation]] [[nearestLocations]] [[nearestLocationWithDubbing]] [[name]]
}}
}}

Latest revision as of 10:38, 13 May 2022

Hover & click on the images for description

Description

Description:
Creates a structured text containing the given plain text if argument is String. Use setAttributes to set additional attributes on the text. If the argument is location, returns location's text value (see Alt Syntax).
Groups:
LocationsStringsStructured Text

Syntax

Syntax:
text string
Parameters:
string: String
Return Value:
Structured Text

Alternative Syntax

Syntax:
text location
Parameters:
location: Location
Return Value:
String

Examples

Example 1:
_stxt2 = text "Hello world.";
Example 2:
_townName = text myTownLocation;
Example 3:
_loc = text nearestLocation [position player, "NameMarine"]; //"Marina Bay"

Additional Information

See also:
parseText composeText image lineBreak setText createLocation deleteLocation drawLocation locationPosition locationNull nearestLocation nearestLocations nearestLocationWithDubbing name

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