Note on using On hide and changing dependent variables UI

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
Counter Arts
Miko-Class Veteran
Posts: 649
Joined: Fri Dec 16, 2005 5:21 pm
Completed: Fading Hearts, Infinite Game Works
Projects: Don't Save the World
Organization: Sakura River
Location: Canada
Contact:

Note on using On hide and changing dependent variables UI

#1 Post by Counter Arts »

It's not really a bug but something to consider.

I recently had an issue with trying to fix a bug with my "tons of code" Ui. I actually removed a string from a list directly after hiding a Ui window that depended on it. I also had a selected index which marked which one in the list was currently displayed on screen (a screen worth of stuff to display for each thing in the list). So if the selected index was the last item on the list renpy would crash because while hiding the window renpy still references that item in the list.

I got around it by making a copy of the list and having the Ui reference the copy while action modifying the original list.
Fading Hearts is RELEASED
http://www.sakurariver.ca

Post Reply

Who is online

Users browsing this forum: No registered users