Search the Community
Showing results for tags 'finddisplay'.
Found 2 results
-
HI All, I'm having problems trying to create a script that returns the value for the current active display. I want to know if the player is looking at the map or the main screen. allDisplays returns a list of all opened GUI displays, including both the map (findDisplay 12) and the main display (findDisplay 46). BUT I want to know if the map (findDisplay 12) is currently being shown and the main display (findDisplay 46) display is hidden underneath and vice-versa. Thansk in advance... RESOLVED: visibleMap
-
Hi so I have this script which detects keystrokes and calls for another script waituntil {!(IsNull (findDisplay 46))}; key_ctrl = 29; key_star = 55; pressed_ctrl = false; pressed_star = false; (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == key_ctrl) then {pressed_ctrl = true;}, if (_this select 1 == key_star) then {pressed_star = true;}"]; (findDisplay 46) displayAddEventHandler ["KeyUp", "if (_this select 1 == key_ctrl) then {pressed_ctrl = false;}, if (_this select 1 == key_star) then {pressed_star = false;}"]; while {true} do { if (pressed_ctrl && pressed_star) then { startscript = true}; if (startscript) then {roster = []execVM "MRHRoster\rosterscript.sqf"; startscript = false;}; }; Now, trouble is it uses display 46, and the loop seems to mess big time with any other script using display 46. I am trying to call a visual interface (made with GUI editor) for instance, and when this script is running the interface won't close. So i'd like to create a new display, but the documentation is very unclear, it says I need to create a new display in the description.ext I have tried this : class RscDisplayNew { idd=77; scriptName = "RscDisplayNew"; }; to no avail.... What am I doing wrong?