Can't hide already picked options ;~;[SOLVED]

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
RainbowMusicAddict
Regular
Posts: 27
Joined: Sat Nov 12, 2011 12:37 am
Contact:

Can't hide already picked options ;~;[SOLVED]

#1 Post by RainbowMusicAddict » Fri Dec 21, 2012 2:19 am

I've tried searching everywhere,
and as far as I can find out I have everything the way I'm supposed to >.<
I cannot get my options to hide after they've been selected.
I also wanted to have the last option of seeing everything to appear after all options have disappeared(if that's possible),
and I'm not quite sure how to do that either.
After the options have been gone through and returning to the choices,
they are still there and refuse to disappear for me. D:
I'm sorry if someone has already solved this,
but the only other topic I saw where the person had this problem got it solved,
and it got me this far, but nothing is hiding.


Code: Select all

label choices:
    $ birthday_surprise_done = False 
    $ christmas_surprise_done = False 
    $ oneyear_anniversary_done = False
        
    menu:
         
        "Birthday Special" if birthday_surprise_done == False:
            $ birthday_surprise_done = True
            jump birthday
        "Christmas Special" if christmas_surprise_done == False:
            $ christmas_surprise_done = True
            jump christmas
        "One Year Special" if oneyear_anniversary_done == False:
            $ oneyear_anniversary_done = True
            jump anniversary
        "I've seen everything":
            jump end
    
    
label birthday:
    
    c "HAPPY BIRTHDAY!" 
    
    jump choices
    
label christmas:
    
    c "MERRY CHRISTMAS!"
    
    jump choices
    
label anniversary:
    
    c "We have been together for one year!"
    
    jump choices
    

    
    
    
label end: 
    
    c "I've worked really hard on this, trying to get everything working right, so I hope you really enjoyed this!"
Last edited by RainbowMusicAddict on Fri Dec 21, 2012 8:33 am, edited 1 time in total.
“Intelligence without ambition is a bird without wings.” -Salvador Dali

User avatar
mirelle
Regular
Posts: 87
Joined: Thu Nov 29, 2012 11:28 am
Projects: The Story of X
Organization: Vocamania
Location: Indonesia
Contact:

Re: Can't hide already picked options ;~;

#2 Post by mirelle » Fri Dec 21, 2012 6:24 am

it's this:

Code: Select all

label choices:
    $ birthday_surprise_done = False
    $ christmas_surprise_done = False
    $ oneyear_anniversary_done = False
        
when you return to the choices label, the the variable would be returned to false ^^"

a way around this is to make them separate labels- to separate the choice and the flags.

Code: Select all

label flags:
    $ birthday_surprise_done = False
    $ christmas_surprise_done = False
    $ oneyear_anniversary_done = False

label choices:
    
    menu:
         
        "Birthday Special" if birthday_surprise_done == False:
            $ birthday_surprise_done = True
            jump birthday
        "Christmas Special" if christmas_surprise_done == False:
            $ christmas_surprise_done = True
            jump christmas
        "One Year Special" if oneyear_anniversary_done == False:
            $ oneyear_anniversary_done = True
            jump anniversary
        "I've seen everything" if  oneyear_anniversary_done and christmas_surprise_done and birthday_surprise_done:
            jump end
   
   
label birthday:
   
    c "HAPPY BIRTHDAY!"
   
    jump choices
   
label christmas:
   
    c "MERRY CHRISTMAS!"
   
    jump choices
   
label anniversary:
   
    c "We have been together for one year!"
   
    jump choices
   

   
   
   
label end:
   
    c "I've worked really hard on this, trying to get everything working right, so I hope you really enjoyed this!"
        
and that's it :D
[[The X Story]]
Discover the hidden truth within-- but be reminded that more often than not, curiosity kills the cat.
lurking here as a representative of the team~

User avatar
RainbowMusicAddict
Regular
Posts: 27
Joined: Sat Nov 12, 2011 12:37 am
Contact:

Re: Can't hide already picked options ;~;

#3 Post by RainbowMusicAddict » Fri Dec 21, 2012 7:06 am

Oh my goodness!
Thank you SO so very much!
I had no idea you could even do that,
it will help me a lot :D


And onto the second part of my question
Is there a way to make the last choice only visible when all other choices have been gone through?
If not that's fine,
just curious if it's possible.
“Intelligence without ambition is a bird without wings.” -Salvador Dali

User avatar
mirelle
Regular
Posts: 87
Joined: Thu Nov 29, 2012 11:28 am
Projects: The Story of X
Organization: Vocamania
Location: Indonesia
Contact:

Re: Can't hide already picked options ;~;

#4 Post by mirelle » Fri Dec 21, 2012 7:47 am

it's already answered in the code i gave you :3

Code: Select all

"I've seen everything" if  oneyear_anniversary_done and christmas_surprise_done and birthday_surprise_done:
            jump end
explanation:

Code: Select all

if  oneyear_anniversary_done and christmas_surprise_done and birthday_surprise_done:
it means in order for the choice to appear, oneyear_anniversary_done AND christmas_surprise_done AND birthday_surprise_done must be true. if either of these isn't true, the choice will not appear.

I hope that helps~!
[[The X Story]]
Discover the hidden truth within-- but be reminded that more often than not, curiosity kills the cat.
lurking here as a representative of the team~

User avatar
RainbowMusicAddict
Regular
Posts: 27
Joined: Sat Nov 12, 2011 12:37 am
Contact:

Re: Can't hide already picked options ;~;

#5 Post by RainbowMusicAddict » Fri Dec 21, 2012 8:33 am

I'm terribly sorry!
I had just woken up when I read what you put.
Thank you very much for your help!
I really appreciate it :D
You're a really great help
(And I'm very grateful to you actually showing me what you did with the code,instead of just telling me!)
“Intelligence without ambition is a bird without wings.” -Salvador Dali

Post Reply

Who is online

Users browsing this forum: Imperf3kt