Jump to content

Beginner Plugin Creation - Help With Troubleshooting


TheFinalGiraffe

Recommended Posts

Hello! I'm an absolute beginner to the modding community and I was hoping to make a beginner plugin for Skyrim SE to start learning the ropes. After a couple days of reading tutorial/reference/forum materials I have come to a standstill and am seeking help. I am trying to create a script that will allow the player to press a key and spawn an NPC near them. The code successfully compiled.

 

I have checked that I properly installed SKSE (when using getskseversion in the console it returns the version of SKSE). However, when pressing the 'B' key in game I don't receive any output from the debug notification or any NPCs spawning. I have added the script as a quest event that has "Start Game Enabled" and "Run Once". Even when I disable "Run Once" it still will not work (although this shouldn't have any affect on it?).

 

If anyone could provide any direction, I would greatly appreciate it!

Scriptname Stream_VoiceRec_Spawn extends ObjectReference 
 
import input
 
Event OnInit()
RegisterForKey(48) ; 'B' key
EndEvent 
 
Event OnKeyUp(int KeyCode, Float HoldTime)
if (KeyCode == 48) ; if 'B' is pressed
Game.GetPlayer().PlaceAtMe(Game.GetForm(0x0001CA03), 1)
Debug.Notification("Key Pressed")
; Spawn Skeever
endif 
EndEvent 
Edited by TheFinalGiraffe
Link to comment
Share on other sites

  • Recently Browsing   0 members

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