Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
I'm creating character gallery where user can pick body, face emotion and other stuff to show. I'm stuck with ToggleVariable to add and remove from sprite. It throws me error "The variable other does not exist."
textbutton "BLUSH":
text_style "page_text"
style "page_textbutton"
if body is not "blush_image":
hovered Play("system",guisfx_button_hover)
action [Play("system",guisfx_button_click),
SelectedIf(blush=="blush_image"),
ToggleVariable("blush", true_value="blush_image", false_value=False)]
at gui_buttonfade
Last edited by kostek00 on Wed Apr 10, 2019 2:30 pm, edited 1 time in total.
It's possible you defined your other variable in the wrong place hence the error. If it's alright with you, can you share the code where you defined your other and where it is used. I don't see anywhere in your code where you used the variable so I'm unclear whether it really is a problem with your toggle variable.