Detect when the Player is on the Map Screen?

Post » Tue Nov 20, 2012 8:56 am

Back in Oblivion, you could use the MenuMode block to check if the Player was on their Map Screen, is there anyway to do this in Skyrim? Since we use Events now, I took a look but cannot seem to see a "onMapLoad" or anything like that.
User avatar
Kari Depp
 
Posts: 3427
Joined: Wed Aug 23, 2006 3:19 pm

Post » Tue Nov 20, 2012 10:52 am

Bumping since it's been a couple of days, and I'm still looking for help with this. It's kind of important to one of my Mod's features that I can 'guess' when they're about to fast-travel.
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Tue Nov 20, 2012 7:12 pm

I don't think there is a function for checking whether or not the player is in a specific menu, but there is a function called http://www.creationkit.com/IsInMenuMode_-_Utility. The function isn't perfect since not all menus are considered to be true menus by the game engine. For example the alchemy crafting menu (might apply to all crafting menus) isn't considered a true menu since it doesn't pause the game. In such cases you can detect the menu by checking for the side effects of being in a menu. The alchemy crafting menu disables looking controls so an open menu can be detected by periodically checking the value returned by the IsLookingControlsEnabled function.
User avatar
April
 
Posts: 3479
Joined: Tue Jun 20, 2006 1:33 am

Post » Tue Nov 20, 2012 7:42 am

It's only possible with SKSE :

EVENT OnInit()	 RegisterForMenu("MapMenu")EndEVENTEVENT OnMenuOpen(String Menu)if ( Menu == "MapMenu" )	 MessageBox("Map Menu !")endifEndEVENT
User avatar
Vicki Gunn
 
Posts: 3397
Joined: Thu Nov 23, 2006 9:59 am

Post » Tue Nov 20, 2012 10:16 am

Thanks to both of you :)

I did manage to get it done without SKSE, although it looks like the SKSE command would be a bit more elegant than what I've implemented; for now, though, I'm gonna stick with what I've got (already broke something earlier trying to change it up, haha :)

Thanks again :D
User avatar
Naazhe Perezz
 
Posts: 3393
Joined: Sat Aug 19, 2006 6:14 am


Return to V - Skyrim