How to make a day counter at the top of the screen?

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
Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

How to make a day counter at the top of the screen?

#1 Post by Watercolorheart »

How do I create a displayable at the top of the screen on top of everything that shows the amount of days currently passed?
I'm not even the same person anymore

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: How to make a day counter at the top of the screen?

#2 Post by hell_oh_world »

Maybe try creating your own layer and show your screen in that layer.

Code: Select all

init python:
  config.layers.append("top")

default persistent.days_passed = 0

screen top():
  layer "top"

  text str(persistent.days_passed)

label splashscreen:
  show screen top
  
  return

Post Reply

Who is online

Users browsing this forum: voluorem