{"name":"hintC","operator":null,"title":"hintC","type":"command","url":"https://community.bistudio.com/wiki/hintC","revid":369068,"updated":"2024-09-02T20:24:57Z","groups":["Interaction","Structured Text","Strings"],"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 very basic message dialog in the center of the screen. Player control is taken away until \"Continue\" is pressed. The message dialog can be dragged around on the screen. After \"Continue\" has been pressed, the content of the hintC is repeated in a normal hint.\n\n> [!NOTE]\n> In Singleplayer, the game is paused while the message dialog is visible.","syntaxes":[{"syntax":"hintC message","since":null,"effect":null,"exec":null,"params":[{"name":"message","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"message: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"message","types":["String"]}},{"syntax":"title hintC message","since":null,"effect":null,"exec":null,"params":[{"name":"title","type":"String","optional":false,"default":null,"description":"message title","types":["String"],"since":null,"text":"title: String - message title"},{"name":"message","type":"String, Structured Text, Array of Strings or Array of Structured Text","optional":false,"default":null,"description":null,"types":["String","Structured Text","Array"],"since":null,"text":"message: String, Structured Text, Array of Strings or Array of Structured Text"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"title","types":["String"]},"right":{"text":"message","types":["String","Structured Text","Array"]}}],"examples":[{"text":"```sqf\nhintC \"Press W to move forward\";\n```","code":["hintC \"Press W to move forward\";"]},{"text":"Same as the above in Arma 3 but without second hint displayed:\n\n```sqf\nhintC \"Press W to move forward\";\nhintC_EH = findDisplay 57 displayAddEventHandler [\"Unload\", {\n    _this spawn {\n        _this select 0 displayRemoveEventHandler [\"Unload\", hintC_EH];\n        hintSilent \"\";\n    };\n}];\n```","code":["hintC \"Press W to move forward\";\nhintC_EH = findDisplay 57 displayAddEventHandler [\"Unload\", {\n\t_this spawn {\n\t\t_this select 0 displayRemoveEventHandler [\"Unload\", hintC_EH];\n\t\thintSilent \"\";\n\t};\n}];"]},{"text":"```sqf\n\"Instructions\" hintC [\n    \"Press W to move forward.\",\n    \"Press S to move backwards.\",\n    \"Use the mouse to turn right or left.\",\n    \"Press V for weapon sights.\"\n];\n```","code":["\"Instructions\" hintC [\n\t\"Press W to move forward.\",\n\t\"Press S to move backwards.\",\n\t\"Use the mouse to turn right or left.\",\n\t\"Press V for weapon sights.\"\n];"]},{"text":"Same as the above in Arma 3 but without second hint displayed:\n\n```sqf\n\"Instructions\" hintC [\n    \"Press W to move forward.\",\n    \"Press S to move backwards.\",\n    \"Use the mouse to turn right or left.\",\n    \"Press V for weapon sights.\"\n];\nhintC_EH = findDisplay 72 displayAddEventHandler [\"Unload\", {\n    _this spawn {\n        _this select 0 displayRemoveEventHandler [\"Unload\", hintC_EH];\n        hintSilent \"\";\n    };\n}];\n```","code":["\"Instructions\" hintC [\n\t\"Press W to move forward.\",\n\t\"Press S to move backwards.\",\n\t\"Use the mouse to turn right or left.\",\n\t\"Press V for weapon sights.\"\n];\nhintC_EH = findDisplay 72 displayAddEventHandler [\"Unload\", {\n\t_this spawn {\n\t\t_this select 0 displayRemoveEventHandler [\"Unload\", hintC_EH];\n\t\thintSilent \"\";\n\t};\n}];"]},{"text":"```sqf\nprivate _separator = parseText \"<br/>------------------------<br/>\";\nprivate _image = \"\\ca\\ui\\textures\\aus_flag.paa\";\nprivate _message = composeText [image _image, \"Heading Text\", _separator, \"Content\"];\n\"\" hintC _message;\n```","code":["private _separator = parseText \"<br/>------------------------<br/>\";\nprivate _image = \"\\ca\\ui\\textures\\aus_flag.paa\";\nprivate _message = composeText [image _image, \"Heading Text\", _separator, \"Content\"];\n\"\" hintC _message;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["hint","hintCadet","hintSilent","BIS_fnc_guiMessage"],"notes":[{"user":"Str","date":"2006-07-31T18:18:00Z","text":"This command must be executed after mission start. If you place it into init.sqs or init field of some unit, it will not work. Just add a little delay (~0.001) and the place the command."},{"user":"Worldeater","date":"2009-05-15T23:42:00Z","text":"To display multiple messages after another you have to add a small delay in between. Otherwise only the first message will be displayed.\n\n```sqf\nhintC \"foo\"; sleep 0.1; hintC \"bar\"\n```\n\nWithout a sleep statement hintC will not suspend the script it has been called from."},{"user":"Killzone_Kid","date":"2015-03-19T09:52:00Z","text":"\"Titled\" hintC uses `display #72` while \"untitled\" one uses `display #57`. If you are trying examples in Arma 3 debug console, add a little delay like this:\n\n```sqf\n0 spawn { sleep 0.5; /* your example code goes here*/ };\n```\n\n or no hintC will be displayed."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Interaction","Command Group: Strings","Command Group: Structured Text","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"]}