Jump to content

Recommended Posts

Posted

Iâve been racking my brain over how to set up an event to fire when a global is updated (this global is updated infrequently). I havenât found any information regarding variable changes firing events, so I may end up having to poll for a change when compared to a local (not ideal as I prefer interrupt style code).

 

Am I missng something?

 

TIA

Posted

Thanks SKK50. My mod is a plugin for another mod's master file (stupid me forgot to mention this as it is a pretty big piece of info). I'm tracking a global it updates, so unless I want to rewrite his code, I don't think I can fire off a custom event when the global is updated. I was hoping there was a method that could fire an event when a passed variable changes value. The good news is I did come up with a hacky work around. The situation I need to monitor the global changing value only occurs when the player is in a terminal menu housed through the pip boy. So registering for a menu open close event, and watching for a terminal close gives me the desired results. Yeah, it'll fire off on every terminal exit, but the script is pretty lightweight (updating array). In my instance, there aren't any downsides.

  • Recently Browsing   0 members

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