Help needed with Renpy - rollback and date

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
MarkW
Newbie
Posts: 4
Joined: Sun Oct 21, 2012 4:21 am
Contact:

Help needed with Renpy - rollback and date

#1 Post by MarkW » Sun Aug 25, 2013 3:23 pm

Hi All,

Very new to Ren'py, almost finished coding my first game, a political sim, using this language and wanted to ask a few questions I couldn't find answers to in the forums/guides:

1. Is there code that allows a player to go back to the last label they were at? I know rollback does this, but I want to disable rollback generally, but have this as a a menu option like:
menu:
"Ask for Advice":
jump advice
"Agree to this proposal":
(rollback to previous label)
Any ideas?

2. Any good code on here for having a date in the right corner of the screen? I don't want time, but something like "Year One, Season one" that I can update the numbers on later.

Sorry if this has been covered on threads before, but sometimes I find it's easier just to ask for what you want rather than start messing with someone elses code to try and make it do something different. Especially when you're new to a language ;)
If anyone can help, let me know. Thanks.

Mark

User avatar
jghibiki
Regular
Posts: 125
Joined: Wed Sep 19, 2012 9:08 pm
Projects: Dream's Dénouement, Unannounced RPG framework, Renpy-Safe Logger
Organization: Team Anarky
IRC Nick: jghibiki
Location: Minnesota, US
Contact:

Re: Help needed with Renpy - rollback and date

#2 Post by jghibiki » Sun Aug 25, 2013 11:13 pm

Try this for the date displayable.

As for the label business, you can use call instead of jump but that returns you to right after the call statement. which would work fine if you did something like...

Code: Select all

label myL1:
   menu:
      "What's the color of the sky?."
      "Red.":
          call RedL
      "Blue":
          "Nothing noteworthy."
   jump myL1

label RedL: 
   #script here

_______________________________________
jghibiki
Web/Twitter/Tumblr

MarkW
Newbie
Posts: 4
Joined: Sun Oct 21, 2012 4:21 am
Contact:

Re: Help needed with Renpy - rollback and date

#3 Post by MarkW » Mon Aug 26, 2013 4:15 pm

Thanks jghibiki, those both worked nicely.
Cheers! ;)

Post Reply

Who is online

Users browsing this forum: enaielei