Blue92 0 Posted March 18, 2019 The below code works just as you assume it would. The spectator is closed, the escape menu is opened, and then closed. [] spawn { waitUntil {!isNull findDisplay 49}; ["Terminate"] call BIS_fnc_EGSpectator; }; [] spawn { waitUntil {!isNull findDisplay 49}; (findDisplay 49) closeDisplay 1; }; The code below however, won't close the escape menu, and I don't understand why... Is it simply because it gets executed too fast? Wouldn't display 49 already need to be open when it gets there though? Why do we need to wait, again? [] spawn { waitUntil {!isNull findDisplay 49}; ["Terminate"] call BIS_fnc_EGSpectator; }; [] spawn { (findDisplay 49) closeDisplay 1; }; Share this post Link to post Share on other sites
killzone_kid 1333 Posted March 18, 2019 are you using mods? both codes work for me if I execute them in debug console while spectator is opened Share this post Link to post Share on other sites
Blue92 0 Posted March 18, 2019 There are mods, but, none of them should be effecting the displays, I think? Sorry, really new to all of this. I'm not executing them in the debug, maybe that's why we're getting different results? Edit/Solution: I wasn't able to figure it out other than I summed it up to some kind of timing issue. I just did the below, and it worked fine, just being picky is all, thought I was missing something important. [] spawn { waitUntil {!isNull findDisplay 49}; ["Terminate"] call BIS_fnc_EGSpectator; (findDisplay 49) closeDisplay 1; waitUntil {isNull findDisplay 49}; }; Share this post Link to post Share on other sites
pierremgi 4945 Posted March 19, 2019 0 = [] spawn { while {true} do { waitUntil {!isNull findDisplay 314}; uiSleep 0.1; findDisplay 314 closeDisplay 0; waitUntil {isNull findDisplay 314}; }; }; Share this post Link to post Share on other sites