Jump to content

Looking to script an activator to open the quickmap


Chronepsys

Recommended Posts

Hi all,

 

I am looking for a way to open the quick map when using an activator.

 

I tried to understand how to use :

 

int MapKey = Input.GetMappedKey("Quick Map")
Input.TapKey(MapKey)

 

 

 

But did not succeed.

 

Can you help me please ?

Edited by Chronepsys
Link to comment
Share on other sites

This requires SKSE:

 

UI.InvokeString("MapMenu", "_global.skse.OpenMenu", "MapMenu")

Or as a helper function:

 

;/*
 * Opens a UI menu by invoking a string. Requires SKSE
 * Example for asMenuType is "InventoryMenu"
 *
 * UI.InvokeString example usage:
 * {Opens the Map Menu}
 * UI.InvokeString("MapMenu", "_global.skse.OpenMenu", "MapMenu")
 */;
function OpenMenu(string asMenuType, string asMenuName = "HUD Menu", string asTarget = "_global.skse.OpenMenu") global
    UI.InvokeString(asMenuName, asTarget, asMenuType)
endfunction
Link to comment
Share on other sites

Not sure to understand right.

 

While using : UI.InvokeString("MapMenu", "_global.skse.OpenMenu", "MapMenu")

 

I get compiling errors like :

variable UI is undefined

none is not a known user-defined type
Sorry but i am a very beginner in script and i don't manage very well this.
Could you explain a little please ?
Link to comment
Share on other sites

Attach a new script to your Activator and add the following:

 

event OnActivate(ObjectReference akActionRef)
    UI.InvokeString("MapMenu", "_global.skse.OpenMenu", "MapMenu")
endevent

I've only ever installed SKSE manually so I can't speak to MO. But you should make sure the SKSE scripts are installed correctly by going to Data/Scripts/Source and seeing if there's a UI.psc file in there.

Link to comment
Share on other sites

The SKSE file you downloaded, need to make sure to copy contents of its Data directory to Data under your SSE folder. I don't really know how MO does it, but chances are it keeps those file someplace separate. At the very least, you need all the files under Data/Scripts.

 

Also, go into Data/Source/Scripts under your SSE folder, and into it, copy everything you have under Data/Scripts/Source.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...