text: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (template:command argument fix)
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|TEXT]]
{{Command|= Comments
[[Category:Scripting Commands ArmA|TEXT]]
____________________________________________________________________________________________
 
| arma |= Game name


|1.00|= Game version
____________________________________________________________________________________________


<h2 style="color:#000066">''' text ''text'''''</h2>
| 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=
____________________________________________________________________________________________


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


'''Operand types:'''
|p1= string: [[String]] |PARAMETER1=


text: [[String]]
| [[Structured Text]] |RETURNVALUE=


'''Type of returned value:'''
| s2= '''text''' location |SYNTAX=


[[Nothing]]
|p21= location: [[Location]] |PARAMETER1=


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


Version 2.01 required.
____________________________________________________________________________________________


'''Description:'''
| [[parseText]], [[composeText]], [[image]], [[lineBreak]], [[setText]], [[createLocation]], [[deleteLocation]], [[drawLocation]], [[locationPosition]], [[locationNull]], [[nearestLocation]], [[nearestLocations]], [[nearestLocationWithDubbing]], [[name]] |SEEALSO=


Creates a structured text containing the given plain text.
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


'''Example:'''
<!-- Note Section END -->
</dl>


txt2 = '''text''' "Hello world."
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|TEXT]]
[[Category:Scripting Commands ArmA|TEXT]]
[[Category:Scripting Commands ArmA2|{{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}}}}]]

Revision as of 15:50, 7 April 2019

-wrong parameter ("Arma") defined!-1.00
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:
Uncategorised

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

Notes

Bottom Section