Page 2 of 2
Re: How do I use & declare variables without the $ symbol?
Posted: Tue Nov 06, 2018 1:11 am
by henvu50
trooper6 wrote: ↑Tue Nov 06, 2018 12:41 am
You can do what you want in your coding. However, PyTom himself has said that best practices are to declare your variables with default or define and not with $ because that will cause troubles with saving/loading and rollback....but those troubles are inconsistent. You might think it is fine, but then it isn't.
But you do what you want.
Fair enough, I'll switch to default and define.
Re: How do I use & declare variables without the $ symbol?
Posted: Tue Nov 06, 2018 1:12 am
by trooper6
Remember only to use define for things that don't change. I imagine you won't be using it much.
Re: How do I use & declare variables without the $ symbol?
Posted: Tue Nov 06, 2018 4:31 pm
by Remix
retain_after_load is almost certainly NOT what you want... It may *appear* to do what you want while the game is open yet will do nothing useful if you close the game, re-open it and load (unless you have progressed dialogue prior to the save, which negates the need to try that as a workaround)
Ren'Py is not really designed to simply enable state saving outside of the progress of dialogue because there are simply too many possibilities to contend with...
If you did want a system that saved some form of state while just a screen was shown you would likely need to write it yourself