Hey folks,
When the game session starts, you can use init python to load specific code into the game. I'm wondering if there is a similar hook to call python when the session ends?
The Python page of the Documentation is not very explicit in this regard.
Any help appreciated!
[Solved] end of session hook for Python code
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.
[Solved] end of session hook for Python code
Last edited by teh on Fri Mar 15, 2019 5:10 am, edited 1 time in total.
- xavimat
- Eileen-Class Veteran
- Posts: 1461
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Discord: xavimat
- Contact:
Re: end of session hook for Python code
Probably you could use the "quit" special label. And put a "python" block in it (or normal label code, not necessarily python).
https://www.renpy.org/doc/html/label.ht ... ial-labels
But I'd ask what are you trying to achieve. Maybe there are other means (like persistent variables, maybe).
https://www.renpy.org/doc/html/label.ht ... ial-labels
But I'd ask what are you trying to achieve. Maybe there are other means (like persistent variables, maybe).
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Re: end of session hook for Python code
Quit works perfectly, thank you!
Who is online
Users browsing this forum: No registered users