Hello fellow devs.
Today's question is: is it possible to instruct ren'py to call a specific label whenever a variable changes?
For example I have variable a = 0
Whenever I increase or decrease the number I would like to call label a_check to perform some actions based on the number.
[SOLVED]Call a label when a variable changes
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.
- Bruni Multimedia
- Regular
- Posts: 114
- Joined: Mon May 15, 2017 12:23 pm
- Projects: Yomi Alliance
- Organization: Bruni Multimedia
- itch: brunimultimedia
- Contact:
[SOLVED]Call a label when a variable changes
Last edited by Bruni Multimedia on Fri Apr 19, 2019 8:41 am, edited 1 time in total.
Re: Call a label when a variable changes
Rather than directly updating the value, why not call a function to update it and do the checks at the same time?
- Bruni Multimedia
- Regular
- Posts: 114
- Joined: Mon May 15, 2017 12:23 pm
- Projects: Yomi Alliance
- Organization: Bruni Multimedia
- itch: brunimultimedia
- Contact:
[SOLVED]Re: Call a label when a variable changes
Oh, I see what you're suggesting. That would be quite a nice idea in fact! I hadn't thought about it, thanks!
Who is online
Users browsing this forum: Google [Bot]