zbigdogz Posted July 14, 2021 Posted July 14, 2021 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!
dylbill Posted July 15, 2021 Posted July 15, 2021 To read from file you can use the papyrusUtil Mod. In the miscUtil script thereâs a ReadFromFile function
zbigdogz Posted July 15, 2021 Author Posted July 15, 2021 Is there any way to do it that doesn't involve another mod? I'm trying to be entirely standalone
dylbill Posted July 15, 2021 Posted July 15, 2021 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.
zbigdogz Posted July 16, 2021 Author Posted July 16, 2021 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?
dylbill Posted July 16, 2021 Posted July 16, 2021 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
NexusComa2 Posted July 17, 2021 Posted July 17, 2021 "I know what I'm going to try to do but it would require me to run a script constantly" -- Be more helpful if you told us what that is. Chances are there are 99 work arounds to your problem.
Recommended Posts