Calling a menu everyday in game

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
Kingv
Veteran
Posts: 324
Joined: Sun Jan 29, 2012 11:54 pm
Projects: Pet Tails, Transformation Sequence, Cheer On!
Tumblr: EphemeralBalance
Deviantart: kingv
Location: USA
Contact:

Calling a menu everyday in game

#1 Post by Kingv » Mon Nov 12, 2012 2:25 am

I'm trying to make a menu that would appear in game that would allow you to pick different activities depending on the time of day. It would be a reoccurring menu that would have slight variations for things you could do for day, noon and night time. But right now I'm just working with the day menu.
Here's what I have so far:

Code: Select all

#Fall 1 Day 5 Thursday
$ month = "Autumn"
$ day_date = 11
$ week_day = "Fri"
$ cycle="day"
scene bg room
show abby
with dissolve
show day
label fall11:
A"It's another beautiful day!"
call dayplans
And here's the day plans menu:

Code: Select all

label dayplans:
A "What should I do this morning?"
menu:
    "Go into town.":
        call worldmap
    "Stay home and relax.":
        call stayhome
    "Work on increasing my skills.":
        call skillincrease
    "Work from home." if freelance == True:
        call workathome
    "I'd rather go back to bed.": 
        call nodayplans    
return

label nodayplans:# Do nothing and end the day
A"There's nothing I want to do today so I'm going to bed."
return
 
The code works well and brings up the day planner but the problem arises when I'm done with the planner and want to end the day. Return just bring it back to the start of the menu. So my question is how would I be able to travel to the next day in game without having to copy and past the day planner over and over?

User avatar
Ryouzanki
Regular
Posts: 31
Joined: Mon May 21, 2012 2:18 am
Projects: Sous le masque / Social shark
Organization: Bal masqué
Location: France
Contact:

Re: Calling a menu everyday in game

#2 Post by Ryouzanki » Mon Nov 12, 2012 2:50 am

Did you try with the dayplanner from the DSE ?

http://www.renpy.org/wiki/renpy/DSE

If you don't want to, you can also use "call" instead of jump which allow you to use several time the same label if the label finish with a return statement.

User avatar
Kingv
Veteran
Posts: 324
Joined: Sun Jan 29, 2012 11:54 pm
Projects: Pet Tails, Transformation Sequence, Cheer On!
Tumblr: EphemeralBalance
Deviantart: kingv
Location: USA
Contact:

Re: Calling a menu everyday in game

#3 Post by Kingv » Mon Nov 12, 2012 2:57 am

Ryouzanki wrote:Did you try with the dayplanner from the DSE ?

http://www.renpy.org/wiki/renpy/DSE

If you don't want to, you can also use "call" instead of jump which allow you to use several time the same label if the label finish with a return statement.
No I haven't tried it yet. I looked at the interface and how you had to plan everything at once and it just didn't fit into how I wanted the game to flow. I've been using call for the menus but I'm not sure what jump does.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Ocelot