{"name":"cutRsc","operator":null,"title":"cutRsc","type":"command","url":"https://community.bistudio.com/wiki/cutRsc","revid":378028,"updated":"2026-01-24T02:09:18Z","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":"Display a resource defined in RscTitles of the mission's Description.ext, the campaign's description.ext or the global config.\n\n> [!NOTE]\n> **Arma 3:** For greater efficiency and ease of modability, it is recommended to use named layers available with String and #Syntax 2.\n\n> [!IMPORTANT]\n> To avoid conflicts with existing layers it is recommended to register a layer with BIS_fnc_rscLayer and to start the name with a TAG:\n>\n> ```sqf\n> (\"TAG_myLayer\" call BIS_fnc_rscLayer) cutRsc [\"myRsc\", \"PLAIN\"];\n> \"TAG_myLayer\" cutRsc [\"myRsc\", \"PLAIN\"];\n> ```","syntaxes":[{"syntax":"cutRsc [class, effect, speed, showInMap, drawOverHUD]","since":null,"effect":null,"exec":null,"params":[{"name":"class","type":"String","optional":false,"default":null,"description":"the class name of the resource. (\"Default\" will remove the current resource.)","types":["String"],"since":null,"text":"class: String - the class name of the resource. (\"Default\" will remove the current resource.)"},{"name":"effect","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":"effect: 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.","types":["Number"],"since":null,"text":"speed: Number - (Optional, default -1) time in seconds to fade in resource."},{"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":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the resource under in-game HUD (for example, a binocular effect)","types":["Boolean"],"since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the resource under in-game HUD (for example, a binocular effect)"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[class, effect, speed, showInMap, drawOverHUD]","types":["Array"]}},{"syntax":"layer cutRsc [class, effect, speed, showInMap, drawOverHUD]","since":null,"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 - Arma 3 v1.58 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 - Arma 3 v1.58 layer name on which the effect is shown. Layer names are **CaSe SeNsItIvE**."},{"name":"class","type":"String","optional":false,"default":null,"description":"the class name of the resource. (\"Default\" will remove the current resource.)","types":["String"],"since":null,"text":"class: String - the class name of the resource. (\"Default\" will remove the current resource.)"},{"name":"effect","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":"effect: 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.","types":["Number"],"since":null,"text":"speed: Number - (Optional, default -1) time in seconds to fade in resource."},{"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":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the resource under in-game HUD (for example, a binocular effect)","types":["Boolean"],"since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the resource under in-game HUD (for example, a binocular effect)"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"layer","types":["Number","String"]},"right":{"text":"[class, effect, speed, showInMap, drawOverHUD]","types":["Array"]}}],"examples":[{"text":"```sqf\ncutRsc [\"binocular\", \"PLAIN\"];\ncutRsc [\"binocular\", \"PLAIN\", 2];\ncutRsc [\"binocular\", \"PLAIN\", 2, false];\n```","code":["cutRsc [\"binocular\", \"PLAIN\"];\ncutRsc [\"binocular\", \"PLAIN\", 2];\ncutRsc [\"binocular\", \"PLAIN\", 2, false];"]},{"text":"```sqf\n2 cutRsc [\"binocular\", \"PLAIN\", 2];\n```","code":["2 cutRsc [\"binocular\", \"PLAIN\", 2];"]},{"text":"```sqf\n\"layer1\" cutRsc [\"binocular\", \"PLAIN\", 2];\n```","code":["\"layer1\" cutRsc [\"binocular\", \"PLAIN\", 2];"]},{"text":"```sqf\n// create IGUI display\n// such display can be closed with closeDisplay command or by overwriting the same cut layer with another output.\n// note that \"Unload\" EH for some reason does not work with such display.\n\"someLayer\" cutRsc [\"RscTitleDisplayEmpty\", \"PLAIN\"];\nprivate _display = uiNamespace getVariable \"RscTitleDisplayEmpty\";\n```","code":["// create IGUI display\n// such display can be closed with closeDisplay command or by overwriting the same cut layer with another output.\n// note that \"Unload\" EH for some reason does not work with such display.\n\"someLayer\" cutRsc [\"RscTitleDisplayEmpty\", \"PLAIN\"];\nprivate _display = uiNamespace getVariable \"RscTitleDisplayEmpty\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["allCutLayers","titleRsc","cutText","cutObj","cutFadeOut","setTitleEffect","allActiveTitleEffects","activeTitleEffectParams"],"notes":[{"user":"Dr_Eyeball","date":"2008-06-30T08:44:00Z","text":"Using cutRsc (instead of titleRsc) for a HUD has the benefits of:\n- having the HUD automatically hide itself when you access the map and redisplay itself after closing the map.\n- using the 'Direct communication' chat channel messages will not interfere with the HUD by hiding it."},{"user":"Killzone_Kid","date":"2013-10-17T16:30:00Z","text":"Regarding removing current resource with cutRsc [\"Default\", \"PLAIN\"]. If it does't work and it gives you error message that \"Default\" is not found, add it by yourself to RscTitles in description.ext so it looks like this:\n\n```cpp\nclass RscTitles\n{\n    class Default \n    {\n        idd = -1;\n        fadein = 0;\n        fadeout = 0;\n        duration = 0;\n    };\n};\n```\n\nAlternatively, you can use cutText, yes cutText command to cancel your resources. As Karel Moricky explains: \"All 'cut' commands are in the same layer, the same as all 'title' commands are in another one.\" So to remove cutRsc resource execute cutText on the same layer:\n\n```sqf\ncutRsc [\"myRsc\", \"PLAIN\"];    // show\ncutText [\"\", \"PLAIN\"];        // remove\n```\n\n```sqf\n10 cutRsc [\"myRsc\", \"PLAIN\"];    // show\n10 cutText [\"\", \"PLAIN\"];        // remove\n```\n\nAlso if you use layers would be a good idea to register them with BIS_fnc_rscLayer to avoid possible clashes with other layers:\n\n```sqf\n(\"myLayerName\" call BIS_fnc_rscLayer) cutRsc [\"myRsc\", \"PLAIN\"];    // show\n(\"myLayerName\" call BIS_fnc_rscLayer) cutText [\"\", \"PLAIN\"];        // remove\n```\n\nYou can also immediately remove resource with cutFadeOut command:\n\n```sqf\n123 cutFadeOut 0;\n```"},{"user":"Sa-Matra","date":"2023-04-13T08:19:35Z","text":"Layer display time seems to be display's \"duration\" parameter divided by \"speed\" provided into this command, which also acts as effect time. So to make sure your display doesn't close after a bit, have your \"\"duration\"\" at a very high number like `duration = 1e11;`"},{"user":"Rpg12","date":"2025-09-01T21:27:41Z","text":"The note by Killzone_kid is no longer valid due to an arma 3 update, ensure you do this instead:\n\n```sqf\n\"exampleLayer\" cutRsc [\"RCSDefinedLayer\", \"PLAIN\"];\n```\n\nThe RCSDefinedLayer is something you define in either config.cpp or description.ext"}],"categories":[]}