The Dink Network

Reply to What's the best way to run a script every time a save is loaded?

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
February 12th 2012, 11:52 AM
wizardg.gif
Paul
Peasant He/Him United States
 
This is something that's bugged my for a long time, and I think there's no good way to do it, but perhaps I'm wrong. The best way I've found is to have the savebot set a flag (in a global variable) before saving, then unset it again. So if it's set when the savebot's main() runs, we assume they just loaded a game and can launch whatever script(s) we need. It works but...

#1 It's kind of convoluted.
#2 It forces startup stuff to be stuck in an obscure location.
#3 Most seriously, it fails completely if you somehow save without a savebot.

Does anybody know a better way?