EDIT:
Got other Qs answered... somewhat. New Q here.
How do I code dates in DSE? (AKA first day is Monday 1, second is Tuesday 2... stuff like that).
Edit: Putting dates
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.
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.
-
- Veteran
- Posts: 208
- Joined: Sat Nov 27, 2010 6:04 pm
- Completed: Secret Santa
- Projects: Memory Lane
- Contact:
Re: Edit: Putting dates
This is what I can tell you that might help you:
Ren'Py has three default layers. The upper-most layer (closest to the front) is called the "overlay".
def date_overlay():
if show_date:
ui.text(month + "%d" % day, size=20, color="#ffffff")
config.overlay_functions.append(date_overlay)
In the example, "month" is a string of the name of the current month, and "day" is an integer of the current date. The "if show_date" is a way to toggle the date off and on when you don't want it. Make sure you define whether or not "show_date" is True or False before you begin the game.
^ From the RenPy FAQ : http://www.renpy.org/wiki/renpy/FAQ#How ... _screen.3F
Actually, I tried and it didn't work =/ So I would also like this question to be answered...
Ren'Py has three default layers. The upper-most layer (closest to the front) is called the "overlay".
def date_overlay():
if show_date:
ui.text(month + "%d" % day, size=20, color="#ffffff")
config.overlay_functions.append(date_overlay)
In the example, "month" is a string of the name of the current month, and "day" is an integer of the current date. The "if show_date" is a way to toggle the date off and on when you don't want it. Make sure you define whether or not "show_date" is True or False before you begin the game.
^ From the RenPy FAQ : http://www.renpy.org/wiki/renpy/FAQ#How ... _screen.3F
Actually, I tried and it didn't work =/ So I would also like this question to be answered...
-
- Regular
- Posts: 35
- Joined: Wed Oct 13, 2010 11:57 am
- Projects: Isle of St. Marcus, `Silver Seas'
- Location: Upstate NY
- Contact:
Re: Edit: Putting dates
Code: Select all
def date_overlay():
if show_date:
ui.text(datestr, size=16, color="#fff", xpos=0.13)
config.overlay_functions.append(date_overlay)
Code: Select all
if (divmod(date,7)[1] == 1):
datestr = 'Tuesday,'
elif (divmod(date,7)[1] == 2):
datestr = 'Wednesday,'
Re: Edit: Putting dates
So where do I put this code?
-
- Regular
- Posts: 35
- Joined: Wed Oct 13, 2010 11:57 am
- Projects: Isle of St. Marcus, `Silver Seas'
- Location: Upstate NY
- Contact:
Re: Edit: Putting dates
I have it in an init python block.
Who is online
Users browsing this forum: No registered users