SetVariable in Textbutton is messing up the idle/hover of the button

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.
Post Reply
Message
Author
rebellare
Regular
Posts: 34
Joined: Mon Nov 06, 2017 9:34 am
Contact:

SetVariable in Textbutton is messing up the idle/hover of the button

#1 Post by rebellare »

So, I made a menu and after testing I saw the button stayed white all the time. It works, but it doesn't look how it's supposed to. Instead of gray(idle) and gold(hover) it stays white all the time.

I picked through it and realised that it was the SetVariable inside it that was causing it.

The code for the button is:

Code: Select all

textbutton "{size=28}Name{/size}" action [SetVariable("variable_name", 0), Hide("current_menu"), Show("new_menu")]
After removing the SetVariable, everything works fine. But, I kinda really need that so if someone knows a way...

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: SetVariable in Textbutton is messing up the idle/hover of the button

#2 Post by Alex »

Yes, that's how it works. Here you can find more explanations - viewtopic.php?f=8&t=26492&p=322596&hilit=button#p322596

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot]