celery 8 Posted January 18, 2011 How does one call a hint box like the ones in the official missions? For example the one at the start of the SP mission Laser Show. I checked missions_e.pbo and the Laser Show mission folder was alarmingly ascetic with no trace of scripts beyond a few lines of init. Share this post Link to post Share on other sites
AZCoder 921 Posted January 18, 2011 I think that's related to one of the BIS functions, advanced hints. Not 100% sure, I'm not at home to check. Share this post Link to post Share on other sites
Acecool 0 Posted January 19, 2011 You can ParseText to add colors, images, alignment and make them look really good. Share this post Link to post Share on other sites
Gekkibi 11 Posted January 19, 2011 hint parseText format [" <t align='left' color='#e5b348' size='1.2'><t shadow='1'shadowColor='#000000'>Cargo Drop</t></t> <img color='#ffffff' image='BTK\Cargo Drop\Images\img_line_ca.paa' align='left' size='0.79' /> <t align='left' color='#eaeaea' size='1.0'>You have to <t color='#fdd785'>get out</t> to load cargo!</t> <img color='#ffffff' image='BTK\Cargo Drop\Images\img_line_ca.paa' align='left' size='0.79' /> "]; All credits goes to BTK. :) Share this post Link to post Share on other sites
celery 8 Posted January 19, 2011 I specifically mean this kind of hint, guys. How is it called or constructed without additional media? Share this post Link to post Share on other sites
AZCoder 921 Posted January 19, 2011 (edited) Yes, advanced hints. Requires Functions module. waitUntil {!isNil "bis_fnc_init"}; [] call bis_fnc_hints; BIS_AdvHints_THeader = "Tacos are good"; BIS_AdvHints_TInfo = "Go buy some tacos."; BIS_AdvHints_TAction = "Take money with you."; BIS_AdvHints_TBinds = ""; BIS_AdvHints_Text = call BIS_AdvHints_formatText; BIS_AdvHints_HideCond = "[bIS_WP_Pistols] call BIS_checkptReached"; call BIS_AdvHints_showHint; That codes creates this: You can find this code inside the BootCamp shared folder for Arrowhead. I only changed the text because they use stringtable identifiers. I left BIS_AdvHints_HideCond unchanged. Not totally sure how that works, except that when you reach a spot it will hide the advanced hint :) bis_fnc_hints must be called first to initialize. Looks like this for the curious: scriptName "modules_e\Functions\objects\fn_hints.sqf"; /* File: fn_hints.sqf Author: Jiri Wainar Description: Advanced hint system */ BIS_AdvHints_Path = "ca\modules_e\functions\hints\"; _system = "fn_hints_"; call compile preprocessfilelinenumbers (BIS_AdvHints_Path + _system + "main.sqf"); call compile preprocessfilelinenumbers (BIS_AdvHints_Path + _system + "functions.sqf"); call compile preprocessfilelinenumbers (BIS_AdvHints_Path + _system + "functions_animations.sqf"); call compile preprocessfilelinenumbers (BIS_AdvHints_Path + _system + "functions_navigation.sqf"); call compile preprocessfilelinenumbers (BIS_AdvHints_Path + _system + "functions_targeticons.sqf"); bis_fnc_hints_nav_helper = BIS_AdvHints_Path + _system + "nav_helper.fsm"; if (isnil "BIS_debugMode") then {BIS_debugMode = false}; if (isnil "BIS_MissionName") then {BIS_MissionName = "MISSING MISSION NAME"}; if (isnil "BIS_Objectives") then {BIS_Objectives = ["MISSING OBJECTIVES"]}; //set defaults [] call BIS_AdvHints_setDefaults; Edited January 19, 2011 by AZCoder Share this post Link to post Share on other sites
Gekkibi 11 Posted January 19, 2011 Edit: Nevermind. Someone replied before me. :) Share this post Link to post Share on other sites
celery 8 Posted January 19, 2011 Awesome, thanks AZC! :) Share this post Link to post Share on other sites
AZCoder 921 Posted January 19, 2011 (edited) Oh just to be complete, here's the flashlight code. I found it in mission.fsm of TE05_Night_ops.Zargabad. I like this one because it has more options, like getKeyBind and KeyPress. call BIS_AdvHints_setDefaults; BIS_AdvHints_THeader = localize "STR_EP1_mission.fsmFSM_States_Flashlight0"; BIS_AdvHints_TInfo = localize "STR_EP1_mission.fsmFSM_States_Flashlight1"; BIS_AdvHints_TAction = localize "STR_EP1_mission.fsmFSM_States_Flashlight2"; BIS_AdvHints_TBinds = [ localize "STR_EP1_hunt3", {'HeadLights' call BIS_getKeyBind} ]; BIS_AdvHints_Text = call BIS_AdvHints_formatText; BIS_AdvHints_KeyPress = "HeadLights"; BIS_AdvHints_Spawn = [] spawn BIS_AdvHints_showHintSpawn; As before, it requires that call bis_fnc_hints is called first. BIS simply put that in a common shared folder for all bootcamp missions. Edited January 19, 2011 by AZCoder Share this post Link to post Share on other sites
Mr. Charles 22 Posted January 19, 2011 Looks nicer than the standard 'pling' wall of text^^ Share this post Link to post Share on other sites
Xero 10 Posted January 20, 2011 (edited) How do you make the hint that AZCoder provided go away? It stays on the screen and I don't know how to get it off. Edit: Nervermind, I figured it out. Just change the "BIS_AdvHints_HideCond" (Hide Condition) waitUntil {!isNil "bis_fnc_init"};[] call bis_fnc_hints; BIS_AdvHints_THeader = "Tacos are good"; BIS_AdvHints_TInfo = "Go buy some tacos."; BIS_AdvHints_TAction = "Take money with you."; BIS_AdvHints_TBinds = ""; BIS_AdvHints_Text = call BIS_AdvHints_formatText; BIS_AdvHints_HideCond = "[bIS_WP_Pistols] call BIS_checkptReached"; call BIS_AdvHints_showHint; Edited January 21, 2011 by Xero Share this post Link to post Share on other sites
2nd ranger 282 Posted June 1, 2011 Addendum: [] Spawn { BIS_AdvHints_THeader = "Tacos are good."; BIS_AdvHints_TInfo = "You should buy tacos."; BIS_AdvHints_TAction = "Exchange legal currency for Tacos."; BIS_AdvHints_TBinds = ""; BIS_AdvHints_Text = call BIS_AdvHints_formatText; [color="DarkRed"]BIS_AdvHints_Duration = 5;[/color] BIS_AdvHints_HideCode = "hintSilent '';"; call BIS_AdvHints_showHint; }; With this code, the highlighted line obviously exits the hint after 5 seconds, displaying the little timer icon and duration bar that you see in OA missions. If you omit this line, a message is displayed at the bottom of the hintbox saying "Press Space to continue", and in so doing, you can hide the hint. Has anyone used the HideCond thing successfully? I tried using getvariable and regular variables with it but nothing. Share this post Link to post Share on other sites
carlostex 38 Posted June 2, 2011 Awesome, thanks AZC! :) Is Celery gonna swap religions?? Could it be that he will become a member of the .sqf church? :p Share this post Link to post Share on other sites
thetrooper 10 Posted September 11, 2011 I quite like the one AZCoder managed to produce. Any ideas how to get it to disappear over a set time though, or even show a clock timer? Share this post Link to post Share on other sites
galzohar 31 Posted September 11, 2011 From post #12: BIS_AdvHints_Duration = 5; Share this post Link to post Share on other sites