text: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "\|x([0-9]) *= * <code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(43 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma |Game name=
|game1= arma1
|version1= 1.00


|1.00|Game version=
|game2= arma2
|version2= 1.00


|gr1= Locations |GROUP1=
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| 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=
|game4= tkoh
____________________________________________________________________________________________
|version4= 1.00


|'''text''' string |SYNTAX=
|game5= arma3
|version5= 0.50


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


| [[Structured Text]] |RETURNVALUE=
|gr2= Strings


| s2= '''text''' location |SYNTAX2=
|gr3= Structured Text


|p21= location: [[Location]] |PARAMETER1=
|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).


| r2= [[String]] |RETURNVALUE=
|s1= [[text]] string
____________________________________________________________________________________________
 
|x1= <code>_stxt2 = [[text]] "Hello world.";</code> |EXAMPLE1=
|x2= <code>_townName = [[text]] myTownLocation;</code> |EXAMPLE2=
|x3= <code>_loc = [[text]] [[nearestLocation]] [<nowiki/>[[position]] [[player]], "NameMarine"]; //"Marina Bay"</code> |EXAMPLE3=


____________________________________________________________________________________________
|p1= string: [[String]]


| [[parseText]], [[composeText]], [[image]], [[lineBreak]], [[setText]], [[createLocation]], [[deleteLocation]], [[drawLocation]], [[locationPosition]], [[locationNull]], [[nearestLocation]], [[nearestLocations]], [[nearestLocationWithDubbing]], [[name]] |SEEALSO=
|r1= [[Structured Text]]


}}
|s2= [[text]] location
 
|p21= location: [[Location]]
 
|r2= [[String]]
 
|x1= <sqf>_stxt2 = text "Hello world.";</sqf>


<h3 style="display:none">Notes</h3>
|x2= <sqf>_townName = text myTownLocation;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x3= <sqf>_loc = text nearestLocation [position player, "NameMarine"]; //"Marina Bay"</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[parseText]] [[composeText]] [[image]] [[lineBreak]] [[setText]] [[createLocation]] [[deleteLocation]] [[drawLocation]] [[locationPosition]] [[locationNull]] [[nearestLocation]] [[nearestLocations]] [[nearestLocationWithDubbing]] [[name]]
[[Category:Scripting Commands|TEXT]]
}}
[[Category:Scripting Commands Armed Assault|TEXT]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Locations|{{uc:{{PAGENAME}}}}]]

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