Boomsin Posted March 23, 2017 Share Posted March 23, 2017 Hi everyone, I want to write a Script that would detect user input (keystrokes) to call actions using different keys other than the default for Skyrim. My first try was with this script added to a weapon: Event OnEquipped(Actor akActor) RegisterForKey(49) EndEvent Event OnKeyUp(int keyCode, float holdTime) if keyCode == 49 Debug.MessageBox("KeyPressed N") endif EndEvent Event OnUnEquipped(Actor akActor) UnregisterForAllKeys() EndEvent but although the OnEqupped and OnUnEquipped methods are being called, the OnKeyUp it's not. Next I tried making a quest with the same code, as suggested by this thread: https://forums.nexusmods.com/index.php?/topic/843007-skse-keypress-event-script-help/, but i can't even start the Quest. I created a new Quest in the Object Window, added the script, and selected 'Start Game Enabled', what do I need to do to start the Quest? Thank you for the help in advance! Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 23, 2017 Share Posted March 23, 2017 A start game enabled quest starts when the game is started. This includes the very first time that the game is started for a new character as well as the first time the mod is loaded on an existing game. Check your papyrus log for any errors that may be related to your script.Also, confirm that your script is still on the quest. Some times if you do not close and reopen the quest window after creating it, added scripts (and/or other information) may not remain. Link to comment Share on other sites More sharing options...
fore Posted March 24, 2017 Share Posted March 24, 2017 The RegisterForKey/OnKey event don't work from every type of script. I had to move them in one of my mods as well to a quest script. Not 100% sure, but I think it was from an ObjectReference script. Link to comment Share on other sites More sharing options...
Recommended Posts