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: 52
Joined: Tue Feb 27, 2018 2:01 am
Contact:

Make specific choices grayed out and unclickable?

#1 Post by renpyhelp » Thu Jun 21, 2018 11:12 pm

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: 3256
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 » Thu Jun 21, 2018 11:23 pm

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 (Jul 10): Converted LiveComposite Sprites to LayeredImages
*Currently Doing: Trying to work out the transition thing for two character using the same sprite and try to figure out how to redo my multi-barber thing...i.e. see if there is a way to re_do my character callbacks
*First Next thing to do: Rebuild the project with the new RenPy (i.e. with gui.rpy present.), this will mean making some gui art now that I don't have access to the old theme.
*Next thing to do: Code in all the sprite emotion and camera movement for Close Shave Sprite Sections
*Other Thing to Do: Code in all CG and special animation stuff
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

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

Re: Make specific choices grayed out and unclickable?

#3 Post by renpyhelp » Fri Jun 22, 2018 12:24 am

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: 1265
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: xavimat
Location: Italy
Contact:

Re: Make specific choices grayed out and unclickable?

#4 Post by xavimat » Fri Jun 22, 2018 6:52 am

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.
Cops&Robbers A two-player experiment
Fear&Love Why can’t we simply express our feelings? Why am I afraid to say ‘I love you’?
unknown [Sci-Fi - mystery - computer]
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: MaydohMaydoh