×
Меню
Индекс

MSFD Determining if player has menus open

 
[no fix] MenuMode
 
     If ( MenuMode == 1 )
 
MenuMode returns one if the player has menus open, and 0 otherwise.
This doesn't only apply to the inventory and dialogue menus.
 
A good explanation is given by DinkumThinkum:
It looks to me as though the game considers 'MenuMode' to be anytime the mouse pointer is on the screen instead of the crosshairs.
I.e., any time you can move the mouse pointer around on the screen to select things, rather than the whole display moving and you can only select items at the center of the screen.
 
For example, hitting Escape for the in-game Options menu, displaying a message box with an "OK" button (or any other clickable buttons), hitting '`' for the console window: all those count as menu mode, in addition to the more obvious ones such as the dialogue window, the character data/map/inventory screen, the container window, etc.
 
It is common practice to put the following lines at the beginning of almost any script, to prevent unnecessary or problematic functions being processed in MenuMode:
 
If ( MenuMode == 1 )
     Return
Endif