Page 1 of 1

Showing More Menu Options based on Persistant Data

Posted: Sun Oct 23, 2022 1:34 pm
by SelLi
Hi there. This question has almost certainly been asked before, but it seems I don't know how to phrase it well enough to search for it effectively. Basically I'm wanting to "unlock", "show", or "add" items to a menu based on variables. Here's the basic situation I'm thinking of:

The MC, depending on choices made in game, spends time with one of several heroines. After a time skip, the MC chooses who to look up. There are time-travel elements at play, and the MC remembers each heroine he's been with, achieved with persistent data. As the player replays the game and is with more heroines, those heroines are added to the list.

I tried this method, but it didn't work. Hopefully you know what I mean:

Code: Select all

menu:
    "Who should I see...?"
    if persistant.emily == True:
        "Emily":
            jump LB_Emily_After
    if persistant.toto == True:
        "Toto":
            jump LB_Toto_After
    if persistant.mia == True:
        "Mia":
            jump LB_Mia_After
Do you know how to do this properly?
Thank you for any help. Please remember to have a nice day. :heart:

Re: Showing More Menu Options based on Persistant Data

Posted: Sun Oct 23, 2022 1:46 pm
by laure44

Code: Select all

    menu:
        "Who should I see...?"
        "Emily" if persistent.emily:
            jump LB_Emily_After
        "Toto" if persistent.toto:
            jump LB_Toto_After
        "Mia" if persistent.mia:
            jump LB_Mia_After
Careful though, it is 'persistent', not 'persistant'. :)