Jump to content

Unable to call RegisterForKey - no native object


nexusMods3

Recommended Posts

So I've tried using RegisterForKey and RegisterForSingleUpdate, but couldn't use either of them because of the error. I've found some possible causes on the creation kit's website, but none of them seem to be my problem...I've read on other websites about "transient references", and on this topic http://forums.nexusmods.com/index.php?/topic/843007-skse-keypress-event-script-help/ , the guy actually solves the problem, as he says on the last post :"I made a quick blank Quest with a single script in it (the same code that is on the first post), called the sections of code via functions from my object reference script, and it worked!". I also found in another random place a guy saying he made a dummy quest or something like that. But I didn't find any explanation. Can someone explain step by step whatever I have to do with quests to make my RegisterForSingleUpdate work? Thank you.

Edited by nexusMods3
Link to comment
Share on other sites

So I've figured this out...for anyone that might encounter the unable to call something - no native object:

1-Create a quest in the creation kit

2-Go to the script tab and create a script with the events you want(in my case onkeyup, onkeydown)

3-In your original script(not the quest one, the one that wouldn't work because of the error), create a property to refer to this quest.

4-Whenever you need to use the function that was failing before on your original script, you type myDummyQuest.functionThatwasFailing(example: myDummyQuest.RegisterForKey).

 

That's it.

Edited by nexusMods3
Link to comment
Share on other sites

  • Recently Browsing   0 members

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