{"name":"hint","operator":null,"title":"hint","type":"command","url":"https://community.bistudio.com/wiki/hint","revid":376426,"updated":"2025-10-12T22:43:43Z","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":"Outputs a hint message to the right of the screen (left of the screen in Operation Flashpoint) with a sound (except in Armed Assault).\nTo split message in multiple lines either use Structured Text or `\\n` (in lower case).\n\n> [!NOTE]\n> **Armed Assault:** Armed Assault hints are silent. For later titles, see hintSilent.","syntaxes":[{"syntax":"hint message","since":null,"effect":null,"exec":null,"params":[{"name":"message","type":"String or Structured Text","optional":false,"default":null,"description":"the message to display.","types":["String","Structured Text"],"since":null,"text":"message: String or Structured Text - the message to display."}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"message","types":["String","Structured Text"]}}],"examples":[{"text":"```sqf\n// outputs the following:\n// Press W to move forward.\n// Press S to move backwards.\nhint \"Press W to move forward.\\nPress S to move backwards.\"\n```","code":["// outputs the following:\n// Press W to move forward.\n// Press S to move backwards.\nhint \"Press W to move forward.\\nPress S to move backwards.\""]},{"text":"```sqf\nhint format [\"Hello, %1!\", name player];\n```","code":["hint format [\"Hello, %1!\", name player];"]},{"text":"```sqf\nhint str count allPlayers;\nsleep 10;\nhintSilent \"\"; // hides the previous hint display\n```","code":["hint str count allPlayers;\nsleep 10;\nhintSilent \"\"; // hides the previous hint display"]},{"text":"```sqf\nhint parseText \"<t size='2.0'>Large text</t>\"; // displays text twice as large as the default one\n```","code":["hint parseText \"<t size='2.0'>Large text</t>\"; // displays text twice as large as the default one"]},{"text":"```sqf\n_txt = text \"Red text, right align\";\n_txt setAttributes [\"color\", \"#FF0000\", \"align\", \"right\"];\nhint composeText [_txt];\n```","code":["_txt = text \"Red text, right align\";\n_txt setAttributes [\"color\", \"#FF0000\", \"align\", \"right\"];\nhint composeText [_txt];"]}],"multiplayer":null,"problems":"Operation Flashpoint v1.00 Armed Assault v1.00 Arma 2 v1.00 Hint messages that exceed the screen may lead to crashes.\n\nArma 3 v1.00 The game would not crash but suffer FPS drop / temporary freezing.","aliases":[],"see_also":["hintC","hintCadet","hintSilent","diag_log"],"notes":[{"user":"DreadedEntity","date":"2014-10-20T19:27:00Z","text":"Be careful when using hints to visualize the effects of commands using the Debug Console. Hint can accept an undefined variable and neither the error nor the hint is shown, the command simply fails. Also notice how the hint command should be `hint str _i;`:\n\n```sqf\nfor \"_i\" from 0 to 50 do\n{\n    hint _i;\n};\n```\n\n**tested in A3 1.32.127785**\n\nIn a script, an \"undefined variable\" error will be shown as expected."},{"user":"DreadedEntity","date":"2014-10-21T23:07:00Z","text":"Contrary to previous games, Arma 3 will happily display hints that far exceed screen space.\n\nHowever, as hints get longer, FPS suffers tremendously.\n\n**tested in Debug Console, A3 1.32.127785 with the following:**\n\n```sqf\nhint str ((nearestObjects [player, [\"BUILDING\"],  100]) - [player]); 0 spawn { sleep 5; systemChat str diag_fps; };\nsleep 10;\nhint str ((nearestObjects [player, [\"BUILDING\"], 1000]) - [player]); 0 spawn { sleep 5; systemChat str diag_fps; };\n```\n\nResults were: **59.7015** and **5.17297**, respectively. Drawing a hint even longer than this, such as nearestObjects with a radius of 10,000 or 100,000 reduces your FPS so much Arma 3 **appears** to crash, though it doesn't.\n\nUnrelated: Hints will stay on screen for 30 seconds, then fade away over the course of 5 seconds. **Tested with: A3 1.32.127785**"},{"user":"DreadedEntity","date":"2015-02-17T23:14:00Z","text":"An open dialog will pause the 30-second hint fade timer.\n**(A3 1.38.128937)**"},{"user":"Feint","date":"2017-03-25T20:47:00Z","text":"The hint sound is audible only when you have the music volume turned up above 0 in the audio settings.\nOtherwise, it seems to act the same as hintSilent.\n\nThis is important because if you are running a hint that fires at 30 fps or more, the hint will slow down machines that have the music volume turned up but won't slow down machines that have the music volume turned off.\n\nBest practice is to use hint for an alert to the player and use hintSilent for a makeshift display of data to the player that is updated fairly often."}],"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"]}