Day display screen not changing

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
radu32167
Newbie
Posts: 24
Joined: Wed Nov 23, 2016 10:25 am
Contact:

Day display screen not changing

#1 Post by radu32167 »

Hi

In my game i'm trying to have a screen on the top left side that show the day, time of day etc.
I have a separate file for variables and the code looks like this

init:
$ week =1
$ daycounter =0
$ dayname = ("Mon", "Tue", "Wen", "Thu", "Fri", "Sat", "Sun")
$ daydisplay = dayname [(daycounter%7)]
$ timeofdaycounter =0
$ timeofdayname = ("Morning", "Afternoon", "Evening")
$ timeofdaydisplay = timeofdayname [(timeofdaycounter%3)]

the screen code looks like this

screen days():
text "Week [week], [daydisplay], [timeofdaydisplay] " pos (.0, .0) size 20

and at he end of the day, when the player goes to sleep the code looks like this

label sleep:
$ day += 1
$ timeofdaycounter = 0
"You go to bed"
jump morning

But the days don't seem to be changing.
What am I doing wrong?
Can you guys help me.



Thank you

radu32167
Newbie
Posts: 24
Joined: Wed Nov 23, 2016 10:25 am
Contact:

Re: Day display screen not changing

#2 Post by radu32167 »

sorry
wrong part of the forum

User avatar
noeinan
Eileen-Class Veteran
Posts: 1153
Joined: Sun Apr 04, 2010 10:10 pm
Projects: Ren'Py QuickStart, Crimson Rue
Organization: Statistically Unlikely Games
Deviantart: noeinan
Github: noeinan
Location: Washington State, USA
Contact:

Re: Day display screen not changing

#3 Post by noeinan »

Hey, I'm not 100% sure on how to answer your question, but here in the Cookbook section xela provided some free code that makes a calendar, similar to what you are looking for. Here is the link, I hope you find it helpful: viewtopic.php?f=8&t=25098#p309061
Image

Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users