titleText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting_Commands_Take_On_Helicopters" to "[[Category:Scripting Commands Take On Helicopters")
m (Text replacement - "{{HashLink" to "{{Link")
 
(49 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| ofp |Game name=
|game1= ofp
|version1= 1.00


|1.00|Game version=
|game2= ofpe
|version2= 1.00


|eff= local |Multiplayer Effects=
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| 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:
|game4= arma2
<tt>[[titleText]] ["line1\nline2\nline3", "PLAIN"];</tt>. Since Arma 3 v1.73.142260 this command supports [[Structured Text]] formatting.|DESCRIPTION=
|version4= 1.00
____________________________________________________________________________________________


| '''titleText''' [text, type, speed,  showInMap, isStructuredText] |SYNTAX=
|game5= arma2oa
|version5= 1.50


|p1 = [text, type, speed, showInMap, isStructuredText]: [[Array]]
|game6= tkoh
|p2= text: [[String]] - text to be displayed |PARAMETER2=
|version6= 1.00


|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=
|game7= arma3
|p4= speed (Optional): [[Number]] - Time in seconds to fade in resource. Default: -1 |PARAMETER3=
|version7= 0.50
|p5= showInMap (Optional): [[Boolean]] - [[false]] to hide the text when the map is opened. Default: [[true]]  |PARAMETER3=
|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=


| [[Nothing]] |RETURNVALUE=
|eff= local
____________________________________________________________________________________________
 
|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=
|gr1= GUI Control
____________________________________________________________________________________________


| [[titleFadeOut]], [[cutText]], [[cutObj]], [[allActiveTitleEffects]] |SEEALSO=
|descr= 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 (see {{Link|#Example 3}}).


}}
|s1= [[titleText]] [text, type, speed,  showInMap, isStructuredText]
 
|p1= text: [[String]] - text to be displayed
 
|p2= 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.
 
|p3= speed: [[Number]] - (Optional, default -1) time in seconds to fade in resource
 
|p4= showInMap: [[Boolean]] - (Optional, default [[true]]) [[false]] to hide the text when the map is opened
 
|p5= isStructuredText: [[Boolean]] - (Optional, default [[false]]) [[true]] to switch support for [[Structured Text]] formatting - see {{Link|#Example 4}}
|p5since= arma3 1.74
 
|r1= [[Nothing]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>titleText ["Show this text", "PLAIN"];</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x2= <sqf>titleText ["Your message", "BLACK", 2];</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|x3= <sqf>titleText ["line1\nline2\nline3", "PLAIN"];</sqf>


[[Category:Scripting Commands|TITLETEXT]]
|x4= <sqf>titleText ["<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********", "PLAIN", -1, true, true];</sqf>
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|TITLETEXT]]
[[Category:Scripting Commands OFP 1.46|TITLETEXT]]
[[Category:Scripting Commands ArmA|TITLETEXT]]
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
|seealso= [[titleFadeOut]] [[cutText]] [[cutObj]] [[allActiveTitleEffects]] [[activeTitleEffectParams]]  
<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
|user= DreadedEntity
|timestamp= 20141121090300
|text= The third parameter or 'speed', as it is 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''': 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>
'''Note''': Using anything lower than 0.001 seems to have no effect, or the effect is so little it is negligible.<br>
'''(A3 1.34.128075)'''
'''(A3 1.34.128075)'''
</dd>
}}
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 17:43, 4 January 2023

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 (see Example 3).
Groups:
GUI Control

Syntax

Syntax:
titleText [text, type, speed, showInMap, isStructuredText]
Parameters:
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: Number - (Optional, default -1) time in seconds to fade in resource
showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened
since Arma 3 logo black.png1.74
isStructuredText: Boolean - (Optional, default false) true to switch support for Structured Text formatting - see Example 4
Return Value:
Nothing

Examples

Example 1:
titleText ["Show this text", "PLAIN"];
Example 2:
titleText ["Your message", "BLACK", 2];
Example 3:
titleText ["line1\nline2\nline3", "PLAIN"];
Example 4:
titleText ["<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********", "PLAIN", -1, true, true];

Additional Information

See also:
titleFadeOut cutText cutObj allActiveTitleEffects activeTitleEffectParams

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
DreadedEntity - c
Posted on Nov 21, 2014 - 09:03 (UTC)
The third parameter or 'speed', as it is 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 is negligible.
(A3 1.34.128075)