Fair enough, I'll switch to default and define.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.
How do I use & declare variables without the $ symbol?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Re: How do I use & declare variables without the $ symbol?
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: How do I use & declare variables without the $ symbol?
Remember only to use define for things that don't change. I imagine you won't be using it much.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: How do I use & declare variables without the $ symbol?
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
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
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Who is online
Users browsing this forum: Google [Bot]