{"name":"cutText","operator":null,"title":"cutText","type":"command","url":"https://community.bistudio.com/wiki/cutText","revid":347960,"updated":"2023-11-07T15:58:14Z","groups":["GUI Control"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"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]","since":null,"effect":null,"exec":null,"params":[{"name":"text","type":"String","optional":false,"default":null,"description":"text to be displayed","types":["String"],"since":null,"text":"text: String - text to be displayed"},{"name":"type","type":"String","optional":false,"default":null,"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.","types":["String"],"since":null,"text":"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."},{"name":"speed","type":"Number","optional":true,"default":"1","description":"time in seconds to fade in resource. If 0 or less, default value is used","types":["Number"],"since":null,"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","types":["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","types":["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","types":["Boolean"],"since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the text under in-game HUD"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[text, type, speed, showInMap, isStructuredText, drawOverHUD]","types":["Array"]}},{"syntax":"layer cutText [text, type, speed, showInMap, isStructuredText, drawOverHUD]","since":"arma3 1.58","effect":null,"exec":null,"params":[{"name":"layer","type":"Number or String","optional":false,"default":null,"description":"Number or String\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.","types":["Number","String"],"since":null,"text":"layer: Number or String\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","optional":false,"default":null,"description":"text to be displayed","types":["String"],"since":null,"text":"text: String - text to be displayed"},{"name":"type","type":"String","optional":false,"default":null,"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.","types":["String"],"since":null,"text":"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."},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource. If 0 or less, default value is used","types":["Number"],"since":null,"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","types":["Boolean"],"since":null,"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","types":["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","types":["Boolean"],"since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the text under in-game HUD"}],"returns":{"type":"- Nothing when layer is a Number","types":["Nothing","Number"],"description":"Number when ''layer is a String","text":"- Nothing when *layer* is a Number\n- Number when ''layer is a String"},"form":"binary","operator":null,"left":{"text":"layer","types":["Number","String"]},"right":{"text":"[text, type, speed, showInMap, isStructuredText, drawOverHUD]","types":["Array"]}}],"examples":[{"text":"```sqf\ncutText [\"\", \"BLACK OUT\"];\ncutText [\"Hello World!\", \"PLAIN\", 2];\n```","code":["cutText [\"\", \"BLACK OUT\"];\ncutText [\"Hello World!\", \"PLAIN\", 2];"]},{"text":"```sqf\n2 cutText [\"Hello World!\", \"PLAIN\", 2]; // returns nothing\n```","code":["2 cutText [\"Hello World!\", \"PLAIN\", 2]; // returns nothing"]},{"text":"```sqf\nprivate _layer1 = \"normal\" cutText [\"In The Centre\", \"PLAIN\"];\nprivate _layer2 = \"down\" cutText [\"At The Bottom\", \"PLAIN DOWN\"];\n```","code":["private _layer1 = \"normal\" cutText [\"In The Centre\", \"PLAIN\"];\nprivate _layer2 = \"down\" cutText [\"At The Bottom\", \"PLAIN DOWN\"];"]},{"text":"```sqf\ncutText [\"<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********\", \"PLAIN\", -1, true, true];\n```","code":["cutText [\"<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********\", \"PLAIN\", -1, true, true];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["allCutLayers","titleText","cutRsc","cutObj","cutFadeOut","allActiveTitleEffects","activeTitleEffectParams"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}