Jump to content
Sign in to follow this  
thebarricade

Gear dialog

Recommended Posts

I was wondering; is there any way to start a script when the gear dialog is shown (both in the case of pressing the Gear-key, and opening it via the action-menu)?

Share this post


Link to post
Share on other sites

You can determine if the gear dialog is on screen by looking for it's idd number. For gear, it's 106.

To test, write a little script like this and call it from trigger or in mission init:

while {alive player} do
{
player sideChat format["%1", findDisplay 106];
player sideChat "waiting";
sleep 5;
};

This will check if the gear dialog is active every 5 seconds. The important part is the

findDisplay 106

.

Hope that's useful for you.

EIDT:

Something like this will determine exactly when it's opened and closed:

While {alive player} do
{
     WaitUntil {!IsNull (FindDisplay 106)};

     Hint "Map Dialog is open";

     WaitUntil {IsNull (FindDisplay 106)};

     Hint "Map Dialog is closed";
};

Edited by Das Attorney

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
Sign in to follow this  

×