How can I update the variables from one script, via another?

Post » Wed Apr 22, 2015 1:06 am

Short of actually posting all the code, I figured this was worth its own post in the hopes I can solve this issue.

Basically, I have an MCM, which allows the user to change hotkeys, and other values. Those values need to be immediately updated in the main script (ESPECIALLY the hotkey.) I am relying 100% on events only, I don't want to do any sort of polling or register for update stuff.

I added the main script as a property on my config script, in an attempt to directly update the properties, but in-game it does nothing.

What are the best practices for getting MCM values communicated into your main script? Global variables work for most things, if I do some checks on every keypress (ugly) but that doesn't solve rebinding the hotkey issue. The user has to press the old key once for the event to trigger to know the key has changed.

I can supply source if needed.

User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm

Return to V - Skyrim