Reply to Re: Debug mode questions
If you don't have an account, just leave the password field blank.
So, unless things have significantly changed since I last meddled in engine things about a gazillion years ago...
Local variables are stored per script instance number (check ¤t_script, and also the return value of scripts_used()). Calling a custom procedure, either through external("script","proc") or through proc(), creates a new script instance, with its own ¤t_script, and its own scope of local variables.
Globals work as normal. ¤t_sprite is a pseudoglobal which gets transferred over, if applicable.
If you know the script instance number (say, &number), you can run_script_by_number(&number,"proc") (which *doesn't* allow arguments, AFAIK), and all the locals that are known to &number will be available. But beware! This is pretty much a remote-goto. You're instructing script instance &number to forget what it's doing, and do proc() instead. Similar to how you can interrupt the execution of the talk() procedure if you leave Dink unfrozen, and you then trigger hit() instead. run_script_by_number(¤t_script,"proc") is pretty much a goto, except you're using a procedure name instead of a label.
Local variables are stored per script instance number (check ¤t_script, and also the return value of scripts_used()). Calling a custom procedure, either through external("script","proc") or through proc(), creates a new script instance, with its own ¤t_script, and its own scope of local variables.
Globals work as normal. ¤t_sprite is a pseudoglobal which gets transferred over, if applicable.
If you know the script instance number (say, &number), you can run_script_by_number(&number,"proc") (which *doesn't* allow arguments, AFAIK), and all the locals that are known to &number will be available. But beware! This is pretty much a remote-goto. You're instructing script instance &number to forget what it's doing, and do proc() instead. Similar to how you can interrupt the execution of the talk() procedure if you leave Dink unfrozen, and you then trigger hit() instead. run_script_by_number(¤t_script,"proc") is pretty much a goto, except you're using a procedure name instead of a label.