Is there a way to exit menu mode with a script command?

Post » Wed Jun 20, 2012 5:55 pm

There are commands to know if you are in menu mode (inventory, map, spells...), but I can't find any command for exiting that mode, neither to change from one of the submodes to another.

Is there a command I'm not aware of, or a trick letting you exit menu mode?
User avatar
Vickytoria Vasquez
 
Posts: 3456
Joined: Thu Aug 31, 2006 7:06 pm

Post » Wed Jun 20, 2012 7:38 pm

Game.DisablePlayerControls(false, false, false, false, false, true, false)
utility.wait(0.1)
Game.EnablePlayerControls(false, false, false, false, false, true, false)
User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am

Post » Wed Jun 20, 2012 12:04 pm

Thanks!!! :biggrin:

EDIT: It Didn't work. Apparently it disables you ability to access the menu but didn't exit the menu once you are inside.
User avatar
Milagros Osorio
 
Posts: 3426
Joined: Fri Aug 25, 2006 4:33 pm

Post » Wed Jun 20, 2012 7:51 pm

Thanks!!! :biggrin:

EDIT: It Didn't work. Apparently it disables you ability to access the menu but didn't exit the menu once you are inside.

To use what I posted you have to already be in a menu when the script is executed.
User avatar
Rik Douglas
 
Posts: 3385
Joined: Sat Jul 07, 2007 1:40 pm

Post » Wed Jun 20, 2012 7:54 pm

I tested it adding a script to an NPC and placing the instructions in an onitemadded event, with a removeallitems before. When accessed the NPC inventory, giving an item didn't exit the menu but when I exit the menu manually all the items on the NPC are removed (so, the block executes).

In some of the multiple tests though, selecting the NPC name in the inventory menu exited the menu after the item addition, which may be because of the bug sending you out of inventory sometimes, or because of the block executing some of the times you change the inventory tab.

This seem to be similar to what happens with AI packages if you didn't use evaluatepackage instructions, but instead of a long waiting, the price seem to be the block not executing.
User avatar
Skrapp Stephens
 
Posts: 3350
Joined: Mon Aug 06, 2007 5:04 am


Return to V - Skyrim