Question about Menues.

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
Serkai
Regular
Posts: 58
Joined: Fri Jan 18, 2008 9:35 am
Projects: Teo the Deciever, Shades of Grey and Junk Story(SoG and JS are fanworks)
Contact:

Question about Menues.

#1 Post by Serkai » Wed Jan 28, 2009 4:08 pm

I has a question! About menues!

Let's say I wanted to make a cursed forest where the wanderers end up in random locations unless they know certain secrets of the forest. Let's say the base choices, while the player is in camp(which is where each new day will begin) are as follows:
-Leave Camp-, -Hunt for Food- and -Rest for the Day-

Then let's say that through an event, the player learns a secret on how to reach one (or more) of these locations within the forest, let's say a lake just as an example. Then I want the players to, once they've learned that secret, be able to pick whatever location they've got the secret for from the base menu, like so:
-Go to Lake-, -Leave Camp-, -Hunt for Food- and -Rest for the Day-

Would this be possible, and if so, how do I program it?

User avatar
Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

Re: Question about Menues.

#2 Post by Megaman Z » Wed Jan 28, 2009 4:32 pm

use a variable.

Code: Select all

label before_menu:
menu:
    "Choice 1 - no requirement":
        # some stuff. show, text, etc.
        $ temp1 = True
        jump before_menu

    "Choice 2 - requires choice 1 to be done" if temp1 == True:
        # insert your stuff here
you can also do other conditionals, too (I.E. if pcname == "Zeta")
~Kitsune Zeta

Post Reply

Who is online

Users browsing this forum: No registered users