titleText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
(9 intermediate revisions by 6 users not shown)
Line 6: Line 6:
|1.00|= Game version
|1.00|= Game version


|eff= local |= Effects in MP
|eff= local |Multiplayer Effects=
____________________________________________________________________________________________
____________________________________________________________________________________________


| Displays text across the screen.<br>
| Displays text across the screen. If used along with [[cutText]] two different texts (in different type styles) can be shown at once. The text can be displayed on multiple lines by using "\n" new line characters:
If used along with [[cutText]] two different texts (in different type styles) can be shown at once. |= Description
<tt>[[titleText]] ["line1\nline2\nline3", "PLAIN"];</tt>. Since Arma 3 v1.73.142260 this command supports [[Structured Text]] formatting.|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''titleText''' [text, type, speed] |= Syntax
| '''titleText''' [text, type, speed,  showInMap, isStructuredText] |SYNTAX=


|p1= text: [[String]] |= Parameter 1
|p1 = [text, type, speed, showInMap, isStructuredText]: [[Array]]
|p2= type: [[String]]- Possible [[Title Effect Type]]s:<br>
|p2= text: [[String]] - text to be displayed |PARAMETER1=
"PLAIN"<br>
|p3= type: [[String]] one of "PLAIN", "PLAIN DOWN", "BLACK", "BLACK FADED", "BLACK OUT", "BLACK IN", "WHITE OUT" and "WHITE IN". See [[Title Effect Type]]s for more information about these values.|PARAMETER2=
"PLAIN DOWN"<br>
|p4= speed (Optional): [[Number]] - Time in seconds to fade in resource. Default: -1 |PARAMETER3=
"BLACK"<br>
|p5= showInMap (Optional): [[Boolean]] - [[false]] to hide the text when the map is opened. Default: [[true]]  |PARAMETER3=
"BLACK FADED"<br>
|p6= isStructuredText (Optional): [[Boolean]] - [[true]] to switch support for [[Structured Text]] formatting. Default: [[false]] (See Example 3. Available since Arma 3 v1.73.142260) |PARAMETER3=
"BLACK OUT"<br>
"BLACK IN"<br>
"WHITE OUT"<br>
"WHITE IN"|= Parameter 2
|p3= speed: [[Number]] - optional, default 1 |= Parameter 3


| [[Nothing]] |= Return value
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>titleText ["Show this text", "PLAIN"]</pre> |= Example 1
|x1= <code>[[titleText]] ["Show this text", "PLAIN"];</code> |EXAMPLE1=
|x2= <code>[[titleText]] ["Your message", "BLACK", 2];</code> |EXAMPLE2=
 
|x3=Since Arma 3 v1.73.142260:<code>[[titleText]] ["&lt;t color='#ff0000' size='5'>RED ALERT!&lt;/t>&lt;br/>***********", "PLAIN", -1, [[true]], [[true]]];</code> |EXAMPLE3=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[titleFadeOut]], [[cutText]] |= See also
| [[titleFadeOut]], [[cutText]] |SEEALSO=


}}
}}
Line 47: Line 45:


[[Category:Scripting Commands|TITLETEXT]]
[[Category:Scripting Commands|TITLETEXT]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|TITLETEXT]]
[[Category:Scripting Commands OFP 1.96|TITLETEXT]]
[[Category:Scripting Commands OFP 1.46|TITLETEXT]]
[[Category:Scripting Commands OFP 1.46|TITLETEXT]]
Line 54: Line 53:
[[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}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on November 21, 2014 - 09:03 (UTC)</dd>
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt>
<dd class="note">
The third parameter or 'speed', as it's called in the description, refers to the amount of time the message will be shown on-screen. Multiply each number by 10 to get the number of seconds it will be shown. You can even use floats as input, like 0.1, to show a message for only 1 second.<br><br>
'''Note''': Calculating the time with that method does not include the time it takes to fade in/out, which is about 1 second unless you use numbers lower than 1.<br>
'''Note''': Using anything lower than 0.001 seems to have no effect, or the effect is so little it's negligible.<br>
'''(A3 1.34.128075)'''
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 12:15, 5 August 2019

Hover & click on the images for description

Description

Description:
Displays text across the screen. If used along with cutText two different texts (in different type styles) can be shown at once. The text can be displayed on multiple lines by using "\n" new line characters: titleText ["line1\nline2\nline3", "PLAIN"];. Since Arma 3 v1.73.142260 this command supports Structured Text formatting.
Groups:
Uncategorised

Syntax

Syntax:
titleText [text, type, speed, showInMap, isStructuredText]
Parameters:
[text, type, speed, showInMap, isStructuredText]: Array
text: String - text to be displayed
type: String one of "PLAIN", "PLAIN DOWN", "BLACK", "BLACK FADED", "BLACK OUT", "BLACK IN", "WHITE OUT" and "WHITE IN". See Title Effect Types for more information about these values.
speed (Optional): Number - Time in seconds to fade in resource. Default: -1
showInMap (Optional): Boolean - false to hide the text when the map is opened. Default: true
isStructuredText (Optional): Boolean - true to switch support for Structured Text formatting. Default: false (See Example 3. Available since Arma 3 v1.73.142260)
Return Value:
Nothing

Examples

Example 1:
titleText ["Show this text", "PLAIN"];
Example 2:
titleText ["Your message", "BLACK", 2];
Example 3:
Since Arma 3 v1.73.142260:titleText ["<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********", "PLAIN", -1, true, true];

Additional Information

See also:
titleFadeOutcutText

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

Posted on November 21, 2014 - 09:03 (UTC)
DreadedEntity
The third parameter or 'speed', as it's called in the description, refers to the amount of time the message will be shown on-screen. Multiply each number by 10 to get the number of seconds it will be shown. You can even use floats as input, like 0.1, to show a message for only 1 second.

Note: Calculating the time with that method does not include the time it takes to fade in/out, which is about 1 second unless you use numbers lower than 1.
Note: Using anything lower than 0.001 seems to have no effect, or the effect is so little it's negligible.
(A3 1.34.128075)