Jump to content
Atom_Monky

how to detect if gui is open ?

Recommended Posts

Hi, 
i want to check if someone in a player group has an specific gui open.

 

i have this, but im not sure about FindDisplay

 

_members = units (group player);
{
if{!IsNull (FindDisplay 2700)} exitWith {hint "xx dialog is open cant Continue"};
} forEach _members;

 

Share this post


Link to post
Share on other sites

you need () around your condition not {}, otehr than that it looks fin to me. what are you not sure about when it comes to findDisplay?

Share this post


Link to post
Share on other sites

UIs are clientside, looking at that, I doubt it'll work. You cant run code on your PC and expect a return of local values on others.

  • Like 2

Share this post


Link to post
Share on other sites
55 minutes ago, MKD3-FHI said:

UIs are clientside, looking at that, I doubt it'll work. You cant run code on your PC and expect a return of local values on others.

Good point.

 

@Atom_Monky You have to build an MP suitable system here with remoteExec and publicVariable I guess...

Share this post


Link to post
Share on other sites

the question would also be how frequently it should happen. like if it's a one time for all thing like your code looks now or rather an event based thing where everytime that specific dialog will be opened you want it to be closed again.

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

×