Close menu mode - anyway to do this via Papyrus?

Post » Wed Jun 20, 2012 7:26 am

Is there a way to return the player to the game world from Papyrus?
I want the player to return to the game world after clicking an item in their inventory screen.
User avatar
helen buchan
 
Posts: 3464
Joined: Wed Sep 13, 2006 7:17 am

Post » Wed Jun 20, 2012 2:59 am

I suppose http://www.creationkit.com/ToggleMenus_-_Debug works the same as the http://www.creationkit.com/ToggleMenus%5B/url%5DToggleMenus%5B/url%5D console command? I couldn%27t find anything else that seemed relevant in the wiki%27s %5Burl=%22http://www.creationkit.com/Category:Papyrus, which lists all Papyrus functions documented on the wiki.

I think there are some very few undocumented functions, but I don't think there's anything that'll do what you want. Might have to rely on SKSE for this one.

I'd be very interested to hear if you find a way to do this without SKSE, though.

Cipscis
User avatar
Beast Attire
 
Posts: 3456
Joined: Tue Oct 09, 2007 5:33 am

Post » Wed Jun 20, 2012 10:34 am

Is there a way to return the player to the game world from Papyrus?
I want the player to return to the game world after clicking an item in their inventory screen.

I used:

DisablePlayerControls
utility.wait(0.1)
EnablePlayerControls
User avatar
Leonie Connor
 
Posts: 3434
Joined: Mon Mar 12, 2007 4:18 pm

Post » Wed Jun 20, 2012 10:36 am

Very nice! Thanks, KC!

Off-topic but relevant: Unfortunately, we don't have a way to detect which controls are disabled/enabled.
I wanted to use Disable/Enable PlayerControls () for another purpose and in another mod but fear that multiple mods that Enable/Disable controls will conflict.
It is just best practice do Enable () anything you Disable (). So, I usually try to first detect if controls are disabled before disabling it.

E.g.: If the controls already are already disabled (from another mod or cut-scene), I don't bother disabling them again - even if it has no effect at that point in time if I do.
However, I only EnablePlayerControls (), if I disabled them.
Imagine if after my need for it is done, so I EnablePlayerControls () but that cut-scene still requires controls to be disabled.

Moral: Only Disable/Enable controls if they are not already Disabled/Enabled. And when finished, undo that if it was your mod that Disabled/Enabled the controls.

SKSE, we need!
User avatar
Davorah Katz
 
Posts: 3468
Joined: Fri Dec 22, 2006 12:57 pm


Return to V - Skyrim