To disable MINIMAP

Hi,

Any idea to disable the MINIMAP on an Area and so that the player cannot re-open it?

SetGuiPanelDisabled(oPC, GUI_PANEL_MINIMAP, TRUE) should do. Requires EE.

1 Like

Going to work around that :slight_smile:

Well, still looking for a way to disable minimap (and prevent it to be re-openend)

I spent some times exploring lexicon.
On this page: https://nwnlexicon.com/index.php/OnPlayerGuiEvent

it writes:

If a script for OnPlayerGuiEvent cannot be specified in module properties, where could it be specified then?

Can’t you just modify the xml file of the minimap by deleting almost everything so that UI doesn’t work at all?

Nevermind, I just realized that it’s only for a single Area…

You would do that in a script in the module, like the OnModuleLoad event script for example.

The lexicon is not up-to-date. In the current version (36-13) you can specify a script for OnPlayerGuiEvent in the module properties. However this is all EE stuff so if you apparently can’t use SetGuiPanelDisabled() you can neither use SetEventScript() or OnPlayerGuiEvent.

For Enhanced Edition, there is now a command to do so.

Put OnEnter of the area. GetFirstPC() may need to be changed to an entering parameter instead.

SetGuiPanelDisabled(GetFirstPC(), GUI_PANEL_MINIMAP, TRUE);

Then do exactly the same OnExit of the area and make TRUE as FALSE.

If the player has the map open when they transition to the area, the map will automatically be closed and the minimap will not be able to be opened until the variable is FALSE.

FP!