{"name":"cutText","title":"cutText","type":"command","url":"https://community.bistudio.com/wiki/cutText","revid":347960,"updated":"2023-11-07T15:58:14Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"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\"];`\n\n> [!NOTE]\n> **Arma 3:** For greater efficiency and ease of modability it is recommended to use named layers through the alternative syntax.","syntaxes":[{"syntax":"cutText [text, type, speed, showInMap, isStructuredText, drawOverHUD]","params":[{"name":"text","type":"String","description":"text to be displayed","type_expr":"String"},{"name":"type","type":"String","description":"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.","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"1","description":"time in seconds to fade in resource. If 0 or less, default value is used","type_expr":"Number","text":"speed: Number - (Optional, default 1) time in seconds to fade in resource. If 0 or less, default value is used"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","since":"arma3 0.50","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"},{"name":"isStructuredText","type":"Boolean","optional":true,"default":"false","description":"true to switch support for Structured Text formatting - see Example 4","type_expr":"Boolean","since":"arma3 1.74","text":"isStructuredText: Boolean - (Optional, default false) true to switch support for Structured Text formatting - see Example 4"},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the text under in-game HUD","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the text under in-game HUD"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[text, type, speed, showInMap, isStructuredText, drawOverHUD]"}},{"syntax":"layer cutText [text, type, speed, showInMap, isStructuredText, drawOverHUD]","since":"arma3 1.58","params":[{"name":"layer","type":"Number or String","description":"Number or String\n\n- 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.\n- String - layer name on which the effect is shown. Layer names are CaSe SeNsItIvE.","type_expr":"Number | String","text":"layer: Number or String\n\n- 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.\n- String - layer name on which the effect is shown. Layer names are CaSe SeNsItIvE."},{"name":"text","type":"String","description":"text to be displayed","type_expr":"String"},{"name":"type","type":"String","description":"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.","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource. If 0 or less, default value is used","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource. If 0 or less, default value is used"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"},{"name":"isStructuredText","type":"Boolean","optional":true,"default":"false","description":"true to switch support for Structured Text formatting - see Example 4","type_expr":"Boolean","since":"arma3 1.74","text":"isStructuredText: Boolean - (Optional, default false) true to switch support for Structured Text formatting - see Example 4"},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the text under in-game HUD","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the text under in-game HUD"}],"returns":{"type_expr":"Nothing | Number","description":"- Nothing when layer is a Number - Number when layer is a String","text":"- Nothing when *layer* is a Number\n- Number when *layer is a String*"},"form":"binary","left":{"text":"layer"},"right":{"text":"[text, type, speed, showInMap, isStructuredText, drawOverHUD]"}}],"examples":[{"code":["cutText [\"\", \"BLACK OUT\"];\ncutText [\"Hello World!\", \"PLAIN\", 2];"]},{"code":["2 cutText [\"Hello World!\", \"PLAIN\", 2]; // returns nothing"]},{"code":["private _layer1 = \"normal\" cutText [\"In The Centre\", \"PLAIN\"];\nprivate _layer2 = \"down\" cutText [\"At The Bottom\", \"PLAIN DOWN\"];"]},{"code":["cutText [\"<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********\", \"PLAIN\", -1, true, true];"]}],"see_also":["allCutLayers","titleText","cutRsc","cutObj","cutFadeOut","allActiveTitleEffects","activeTitleEffectParams"]}