Jump to content

[LE] Have Skyrim Read External File OR Detect keypresses constantly


Recommended Posts

Hi, I'm trying to get an external program to communicate with Skyrim and the easiest way I could think to do it would be changing an external file, then having Skyrim read it. My second idea was have Skyrim detect a keypress, for example '\', then do something.

The problem I'm having is I can't find if it is possible for papyrus to read external files or how to run a script constantly. I do have a script for detecting if a key is pressed or not though.
Any help or ideas would be amazing!

Link to comment
Share on other sites

There isn't another way that I know of to do it. From papyrus, you can use SetIniFloat, int, bool or string, but the Getters all require skse. Also the input functions, RegisterForKey and OnKeyDown ect all require skse as well.

Link to comment
Share on other sites

I know what I'm going to try to do but it would require me to run a script constantly but I can't figure out what I'm doing wrong. Here is the code

Scriptname DBU_KeyPress extends Quest  

Event OnInit()
	RegisterForSingleUpdate(1)
EndEvent

Event OnUpdate()
	Debug.MessageBox("Waiting 2")
endEvent

It is in a Quest that is Start Game Enabled. From what I've looked up, this should work. Any ideas?

Link to comment
Share on other sites

You need to keep registering for the update:

 

Scriptname DBU_KeyPress extends Quest  


Event OnInit()
    RegisterForSingleUpdate(1)
EndEvent


Event OnUpdate()
    Debug.MessageBox("Waiting 2")
    
    RegisterForSingleUpdate(1)
endEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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