Page 1 of 1

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

Posted: Fri Dec 21, 2012 2:19 am
by RainbowMusicAddict
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!"

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

Posted: Fri Dec 21, 2012 6:24 am
by mirelle
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

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

Posted: Fri Dec 21, 2012 7:06 am
by RainbowMusicAddict
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.

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

Posted: Fri Dec 21, 2012 7:47 am
by mirelle
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~!

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

Posted: Fri Dec 21, 2012 8:33 am
by RainbowMusicAddict
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!)