cutText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(alt syntax, description)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Displays a text message in the center of the screen.|= Description
| Displays a text message in the center of the screen. The text can be displayed on multiple lines by using "\n" new line characters:<br><tt>[[cutText]] ["line1\nline2\nline3", "PLAIN"];</tt><br><br>
Since Arma 3 v1.57.134673 it is possible to allocate layers by passing layer name as parameter.|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''cutText''' [text,type,speed,showOnMap] |= Syntax
| '''cutText''' [text, type, speed, showOnMap] |= Syntax
|p1= [text,type,speed,showOnMap]: [[Array]] |= Parameter 1
|p1= [text, type, speed, showOnMap]: [[Array]] |= Parameter 1
|p2= text: [[String]] - text to be displayed |= Parameter 2
|p2= text: [[String]] - text to be displayed |= Parameter 2
|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. |= Parameter 3
|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. |= Parameter 3
Line 20: Line 21:
| [[Nothing]] |= Return value
| [[Nothing]] |= Return value


|s2= layer '''cutText''' [text,type,speed,showOnMap]    (''Introduced in Arma 2 / VBS2 (1.30+).'')|= Syntax
|s2= layer '''cutText''' [text, type, speed, showOnMap]    (''Introduced in Arma 2 / VBS2 (1.30+).'')|= Syntax
|p21= [text,type,speed,showOnMap]: [[Array]] |=Parameter 1
|p21= layer: [[Number]] - layer number on which the effect is shown, where 0 is the back most. Layer number is rounded to the nearest integer and also cannot be negative. Layer 99.5 will be treated as layer 100. |= Parameter 2
|p22= layer: [[Number]] - Defines the layer in which the effect is shown, where 0 is the backmost one. |= Parameter 2
|p22= [text, type, speed, showOnMap]: [[Array]] |=Parameter 1
|p23= text: [[String]] - text to be displayed |= Parameter 3
|p23= text: [[String]] - text to be displayed |= Parameter 3
|p24= 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. |= Parameter 4
|p24= 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. |= Parameter 4
Line 28: Line 29:
|p26= showOnMap: [[Boolean]] - [[false]] to hide the text when the map is opened (''Introduced in {{arma3}}''). |= Parameter 6
|p26= showOnMap: [[Boolean]] - [[false]] to hide the text when the map is opened (''Introduced in {{arma3}}''). |= Parameter 6
|r2= [[Nothing]] |= Return value
|r2= [[Nothing]] |= Return value
|s3= layerName '''cutText''' [text, type, speed, showOnMap]  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(''Since Arma 3 v1.57.134673'') |= Syntax
|p41= layerName: [[String]] - layer name on which the effect is shown. Layer names are CaSe SeNsItIvE |= Parameter 2
|p42= [text, type, speed, showOnMap]: [[Array]] |=Parameter 1
|p43= text: [[String]] - text to be displayed |= Parameter 3
|p44= 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. |= Parameter 4
|p45= speed: [[Number]] - Time in seconds to fade in resource (optional, default: 1) |= Parameter 5
|p46= showOnMap: [[Boolean]] - [[false]] to hide the text when the map is opened (''Introduced in {{arma3}}''). |= Parameter 6
|r3= [[Number]] - number of the allocated layer |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
Line 35: Line 45:
|x2= <code>2 [[cutText]] ["Hello World!","PLAIN",2];</code> |= Example 2
|x2= <code>2 [[cutText]] ["Hello World!","PLAIN",2];</code> |= Example 2


|x3= <code>1000 [[cutText]] ["In The Centre","PLAIN"];
|x3= <code>_layer1 = "normal" [[cutText]] ["In The Centre","PLAIN"];
1001 [[cutText]] ["At The Bottom","PLAIN DOWN"];</code> |= Example 3
_layer2 = "down" [[cutText]] ["At The Bottom","PLAIN DOWN"];</code> |= Example 3
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 22:22, 20 February 2016

Hover & click on the images for description

Description

Description:
Displays a text message in the center of the screen. The text can be displayed on multiple lines by using "\n" new line characters:
cutText ["line1\nline2\nline3", "PLAIN"];

Since Arma 3 v1.57.134673 it is possible to allocate layers by passing layer name as parameter.
Groups:
Uncategorised

Syntax 1

Syntax:
cutText [text, type, speed, showOnMap]
Parameters:
[text, type, speed, showOnMap]: 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: Number - Time in seconds to fade in resource (optional, default: 1)
showOnMap: Boolean - false to hide the text when the map is opened (Introduced in Arma 3).
Return Value:
Nothing

Syntax 2

Syntax:
layer cutText [text, type, speed, showOnMap] (Introduced in Arma 2 / VBS2 (1.30+).)
Parameters:
layer: Number - layer number on which the effect is shown, where 0 is the back most. Layer number is rounded to the nearest integer and also cannot be negative. Layer 99.5 will be treated as layer 100.
[text, type, speed, showOnMap]: 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: Number - Time in seconds to fade in resource (optional, default: 1)
showOnMap: Boolean - false to hide the text when the map is opened (Introduced in Arma 3).
Return Value:
Nothing

Syntax 3

Syntax:
layerName cutText [text, type, speed, showOnMap]        (Since Arma 3 v1.57.134673)
Parameters:
layerName: String - layer name on which the effect is shown. Layer names are CaSe SeNsItIvE
[text, type, speed, showOnMap]: 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: Number - Time in seconds to fade in resource (optional, default: 1)
showOnMap: Boolean - false to hide the text when the map is opened (Introduced in Arma 3).
Return Value:
Number - number of the allocated layer

Examples

Example 1:
cutText ["","BLACK OUT"]; cutText ["Hello World!","PLAIN",2];
Example 2:
2 cutText ["Hello World!","PLAIN",2];
Example 3:
_layer1 = "normal" cutText ["In The Centre","PLAIN"]; _layer2 = "down" cutText ["At The Bottom","PLAIN DOWN"];

Additional Information

See also:
titleTextcutRsccutObjcutFadeOut

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

Posted on September 20, 2013 - 06:59
Killzone_Kid
In Arma 3 "PLAIN" param will display your text where the crosshair is, "PLAIN DOWN" will push the text further down, closer to the bottom of the screen.

Bottom Section