The button has more than three states

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
User avatar
akakyouryuu
Regular
Posts: 162
Joined: Fri Nov 30, 2012 10:29 am
Contact:

The button has more than three states

#1 Post by akakyouryuu »

I can show the button that has two appearances, selected or unselected.
But I want to show more than three appearances.
For example, I want to show the button that has three appearances like this.
sketch1373245412255-815535816.png
Is this possible with Ren'Py ?

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: The button has more than three states

#2 Post by apricotorange »

Ren'Py buttons don't really have any builtin support for that, but you can fake it:

Code: Select all

define mycoolstate = "A"
screen multibutton:
    if mycoolstate == "A":
        textbutton "A" action SetVariable("mycoolstate", "B")
    elif mycoolstate == "B":
        textbutton "B" action SetVariable("mycoolstate", "C")
    else:
        textbutton "C" action SetVariable("mycoolstate", "A")

User avatar
akakyouryuu
Regular
Posts: 162
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: The button has more than three states

#3 Post by akakyouryuu »

Thank you, I didn't have that idea.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Kia, Majestic-12 [Bot]