Initially I thought that *gosub_scene would be useful for recalling code in multiple scene files (without copy and pasting), such as
*gosub_scene myfunctions myfunc and it is - sort of.
I note that *gosub_scene does actually load the new scene, run the new code and then reload/restore the old one.
This means you can actually get a bit of a delay between code call and execution, I found it most noticeable on a mobile device using a data connection.
It’s not a HUGE problem and it won’t affect most games, but when we’re calling more “codey” routines (as opposed to just blocks of text), having loading bars appear and stuff isn’t ideal. What are the chances of an *import or *include command that actually appends the given scene’s code to your current scene? I think that prove more useful for the recalling of more complicated functions and the like, whilst *gosub_scene works well for calling large bodies of extra text.
In addition that would also allow you to “pass” temp variables to these functions (you don’t really pass them but since you never leave the scene you still access them), at the moment if you *gosub you’re need to make use of globals.
To clarify, I’d love to be able to do something like this:
*temp return_val ""
Well done, Adventurer! You have completed the first part of your quest, your strongest was
functions_highest_stat would be a label inside functions.txt that compared and set “return_val” (or any other temp name you prefer) to the name of the highest stat.