text: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma1 |Game name=
| arma1


|1.00|Game version=
|1.00


|gr1= Locations |GROUP1=
|gr1= Locations


|gr2= Strings |GROUP2=
|gr2= Strings


|gr3= Structured Text |GROUP3=
|gr3= Structured Text


| 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). |DESCRIPTION=
| 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).


|'''text''' string |SYNTAX=
|'''text''' string


|p1= string: [[String]] |PARAMETER1=
|p1= string: [[String]]


| [[Structured Text]] |RETURNVALUE=
| [[Structured Text]]


|s2= '''text''' location |SYNTAX2=
|s2= '''text''' location


|p21= location: [[Location]] |PARAMETER21=
|p21= location: [[Location]] |PARAMETER21=


|r2= [[String]] |RETURNVALUE2=
|r2= [[String]]
   
   
|x1= <code>_stxt2 = [[text]] "Hello world.";</code> |EXAMPLE1=
|x1= <code>_stxt2 = [[text]] "Hello world.";</code>


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


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




| [[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]]
}}
}}



Revision as of 11:24, 18 January 2021

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:
parseTextcomposeTextimagelineBreaksetTextcreateLocationdeleteLocationdrawLocationlocationPositionlocationNullnearestLocationnearestLocationsnearestLocationWithDubbingname

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