Mod Config Menu by Key

Post » Wed Jan 15, 2014 9:08 pm

Greetings, can anyone tell me how can I take my config menu popped up by key pressing? I have a key-press script (one at wiki), but how can I know my page link? For example, I want my page open by N key. Sorry for bad english , best regards!
This is default script on wiki:

Event OnUpdate()If bIsHotkeyPressed != Input.IsKeyPressed(iHotkey)bIsHotkeyPressed = !bIsHotkeyPressedIf bIsHotkeyPressedDebug.Trace("Do something.")EndIfEndIfRegisterForSingleUpdate(0.25)EndEvent
User avatar
Claire
 
Posts: 3329
Joined: Tue Oct 24, 2006 4:01 pm

Post » Thu Jan 16, 2014 5:23 am

You probably don't need the OnInit. It's just my go to Event..

Event OnInit()    RegisterForKey(49) ; The N KeyEndEventEvent OnKeyDown(int Keycode)    if KeyCode == 49        ;do stuff    EndIf    RegisterForSingleUpdate(0.25)EndEvent

You can add some conditions in there too do what you were trying to achieve with the code in your post.

I wish the post format STOPS screwing up the code spacing..

Oh and those are SKSE functions.

User avatar
Eve Booker
 
Posts: 3300
Joined: Thu Jul 20, 2006 7:53 pm


Return to V - Skyrim