Make specific choices grayed out and unclickable?

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
renpyhelp
Regular
Posts: 71
Joined: Tue Feb 27, 2018 2:01 am
Contact:

Make specific choices grayed out and unclickable?

#1 Post by renpyhelp »

Hi, looking for a little help. If it's possible, I'd like to be able to have specific choices be all shown at once, but some grayed out and not clickable (essentially to show that some choices can be shown in the future, but unavailable at this time.) Can that be done? Here is the simple menu code below. Would just like Choice2's opacity be cut in half, and not be able to be highlighted when mouse'd over. Thanks.

Code: Select all

    menu:       

        "Choice 1":
            jump choice_1
        "Choice2":
            jump choice_2

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Make specific choices grayed out and unclickable?

#2 Post by trooper6 »

See this link: viewtopic.php?f=8&t=49233&p=483862&hili ... le#p483862
Searching for "unclickable" brings up a lot of things.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

renpyhelp
Regular
Posts: 71
Joined: Tue Feb 27, 2018 2:01 am
Contact:

Re: Make specific choices grayed out and unclickable?

#3 Post by renpyhelp »

I looked through a good amount of those, but one of those posts I didn't see had exactly what I needed. thank you!

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Make specific choices grayed out and unclickable?

#4 Post by xavimat »

I'd suggest another approach, without changing the screen. See if you like it:

Code: Select all

default done = 0
label start:
    menu PUT_A_NAME_IN_THE_MENU:
        "Option 1" if done == 0:
            "Route 1"
            $ done = 1
        "{color=#777}Option 1{/color}" if done != 0:
            jump PUT_A_NAME_IN_THE_MENU
        "Option 2" if done == 1:
            "Route 2"
            $ done = 2
        "{color=#777}Option 2{/color}" if done != 1:
            jump PUT_A_NAME_IN_THE_MENU
    jump start
- Put a name on the menu, and jump to it as if it were a label.
- Non available options are grey because of the "color" tag. But when hovered they highlight (I know in your first post you say don't want that, sorry).
- Grey options are not actually blocked, but they send immediately to the same menu, so it seems they are doing nothing.
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)

Post Reply

Who is online

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