Difference between revisions of "text"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting Commands ArmA|" to "[[Category:Scripting Commands Armed Assault|")
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
+
{{Command|Comments=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| arma |= Game name
+
| arma |Game name=
  
|1.00|= Game version
+
|1.00|Game version=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| Creates a structured text containing the given plain text if argument is [[String]] or returns location's text value if argument is [[Location]] (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)|DESCRIPTION=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|'''text''' string |= Syntax
+
|'''text''' string |SYNTAX=
  
|p1= string: [[String]] |= Parameter 1
+
|p1= string: [[String]] |PARAMETER1=
  
| [[Structured Text]] |= Return value
+
| [[Structured Text]] |RETURNVALUE=
  
| s2= '''text''' location |= Syntax
+
| s2= '''text''' location |SYNTAX2=
  
|p21= location: [[Location]] |= Parameter 1
+
|p21= location: [[Location]] |PARAMETER1=
  
| r2= [[String]] |= Return value
+
| r2= [[String]] |RETURNVALUE=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
 
   
 
   
|x1= <code>_stxt2 = [[text]] "Hello world.";</code> |= Example 1
+
|x1= <code>_stxt2 = [[text]] "Hello world.";</code> |EXAMPLE1=
|x2= <code>_townName = [[text]] myTownLocation;</code> |= Example 2
+
|x2= <code>_townName = [[text]] myTownLocation;</code> |EXAMPLE2=
|x3= <code>_loc = [[text]] [[nearestLocation]] <nowiki>[</nowiki>[[position]] [[player]], "NameMarine"]; //"Marina Bay"</code> |= Example 3
+
|x3= <code>_loc = [[text]] [[nearestLocation]] [<nowiki/>[[position]] [[player]], "NameMarine"]; //"Marina Bay"</code> |EXAMPLE3=
  
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| [[parseText]], [[composeText]], [[setText]], [[createLocation]], [[deleteLocation]], [[drawLocation]], [[locationPosition]], [[locationNull]], [[nearestLocation]], [[nearestLocations]], [[nearestLocationWithDubbing]], [[name]] |= See also
+
| [[parseText]], [[composeText]], [[image]], [[lineBreak]], [[setText]], [[createLocation]], [[deleteLocation]], [[drawLocation]], [[locationPosition]], [[locationNull]], [[nearestLocation]], [[nearestLocations]], [[nearestLocationWithDubbing]], [[name]] |SEEALSO=
  
 
}}
 
}}
Line 42: Line 42:
 
<h3 style="display:none">Bottom Section</h3>
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|TEXT]]
 
[[Category:Scripting Commands|TEXT]]
[[Category:Scripting Commands ArmA|TEXT]]
+
[[Category:Scripting Commands Armed Assault|TEXT]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
+
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
+
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
[[Category:Command_Group:_Locations|{{uc:{{PAGENAME}}}}]]
 
[[Category:Command_Group:_Locations|{{uc:{{PAGENAME}}}}]]

Latest revision as of 21:03, 3 June 2020

Introduced with Armed Assault version 1.001.00
Hover & click on the images for descriptions

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

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

i
Only post proven facts here. Report bugs on the feedback tracker. Use the Talk page or the Forums for discussions.

Notes

Bottom Section