Jump to content
COL Alexander

Using multiple hintC back-to-back not working

Recommended Posts

I am having some trouble with the hintC function and navigating some of its quirks. Here are the scripting requirements for the text I need to display to the user.

 

1. Must be structured text

2. Must prompt the user to click to continue

3. Must be able to display messages back-to-back (after each click to continue)_

 

Trying to keep the issue pure, here is the essence of what I am trying to do:

 

//call function to show all course results
_action1 = player addAction ["View Completed Courses", "functions\fn_NAV_adminReport.sqf",1];

[fn_NAV_adminReport.sqf]

_allCourses = [_course1, _course2, _course3,..._courseN];   //each _course is a TEXT object (i.e structured text)

 

for "_i" from 1 to count _allCourses  do  {                                              // if there are syntax errors here its because i wrote it in this editor...its the concept that matters

      "myTitle" hintC parseText _myArray[_i-1];

      sleep .1;

};

 

The issue is that only the first hint displays. I use sleep .1 following Worldeater's advice on the BSwiki HintC page...but doesn't work. This also happens with something as simple as this:

 

"title" hintC "FIrst";

sleep 1.5;

"title" hintC "Second";

 

as well as the alternative version (I can't use this version as it doesn't accept structured text):

 

hintC "FIrst";

sleep .1;

hintC "Second";

 

Any advice on how to make hintC display back-to-back or any alternative methods I can use to accomplish my objectives?

 

Share this post


Link to post
Share on other sites
waitUntil {isNull findDisplay 72 && isNull findDisplay 57};

Use this instead of a sleep command.

Share this post


Link to post
Share on other sites
5 hours ago, 7erra said:

waitUntil {isNull findDisplay 72 && isNull findDisplay 57};

Use this instead of a sleep command.

Wow!

Could you send your list of displays, please? I've got nothing more than that for an age!

  • Like 1

Share this post


Link to post
Share on other sites

7erra - Simple and works perfect! BTW this solution also works when suppressing the second hint displayed on the side when user presses continue by using the following code:

 

"title" hintC "message";

hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", {
   0 = _this spawn {
      _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH];
      hintSilent "";
   };

}];

 

 

Thanks...I struggled with this for hours.

Share this post


Link to post
Share on other sites

Well I searched for hintC and luckily I found this on the hintC Biki:

Quote

"Titled" hintC all use display #72 while "untitled" one uses display #57.

 - @KillzoneKid

 

Otherwise you could use something like this:

disableSerialization;
_displayArray = [];
for "_i" from 1 to 9999 do
{
	_display = findDisplay _i;
	if (!isNull _display) then {_displayArray pushBack _display};
};
systemChat str _displayArray;

This returns eg

  • Display #12: Map
  • Display #46: Mission display. If you close it the mission ends.
  • Display #313: Eden Display
  • Display #602: Inventory
  • ...
5 hours ago, Tankbuster said:

Wow. Is this the answer to my question here?

Displaying a hint beforehand doesn't change the array, even with 999999 as maximum. Therefore the hint seems to be no display.

 

And another thing: Many IDDs are defined in the config.bin in "ArmA3 >> Addons >> ui_f.pbo >> config.bin". I found 202 IDDs in this document, like the inventory IDD. In the same directory I found the "defineResincl.inc":

// InGameUI
#define IDD_UNITINFO              300
#define IDD_HINT                  301
#define IDD_TASKHINT              302
#define IDD_STANCEINFO            303
#define IDD_AVCAMERA              304
#define IDD_STAMINA_BAR           305

 

But "findDisplay 301" always returns No display...

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×