titleText: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
Lou Montana (talk | contribs) m (Text replacement - "{{HashLink" to "{{Link") |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 27: | Line 27: | ||
|descr= Displays text across the screen. If used along with [[cutText]] two different texts (in different type styles) can be shown at once. | |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 {{ | 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] | |s1= [[titleText]] [text, type, speed, showInMap, isStructuredText] | ||
Line 35: | Line 35: | ||
|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. | |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 | |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 | |p4= showInMap: [[Boolean]] - (Optional, default [[true]]) [[false]] to hide the text when the map is opened | ||
|p5= isStructuredText (Optional, default [[false]]) | |p5= isStructuredText: [[Boolean]] - (Optional, default [[false]]) [[true]] to switch support for [[Structured Text]] formatting - see {{Link|#Example 4}} | ||
|p5since= arma3 1.74 | |p5since= arma3 1.74 | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>titleText ["Show this text", "PLAIN"];</sqf> | ||
|x2= < | |x2= <sqf>titleText ["Your message", "BLACK", 2];</sqf> | ||
|x3= < | |x3= <sqf>titleText ["line1\nline2\nline3", "PLAIN"];</sqf> | ||
|x4= < | |x4= <sqf>titleText ["<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********", "PLAIN", -1, true, true];</sqf> | ||
|seealso= [[titleFadeOut]] [[cutText]] [[cutObj]] | |seealso= [[titleFadeOut]] [[cutText]] [[cutObj]] [[allActiveTitleEffects]] [[activeTitleEffectParams]] | ||
}} | }} | ||
Latest revision as of 17:43, 4 January 2023
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 1.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:
Additional Information
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
- 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)
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: GUI Control
- Scripting Commands: Local Effect