timeday
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.
-
- Newbie
- Posts: 9
- Joined: Sun Aug 11, 2019 9:53 pm
- itch: renpytom
- Contact:
timeday
Hi, I'm new to Renpy. I wanted to know if someone can help me make my days go by, by night and by clicking on a bed, and showing the days you go.
Re: timeday
Kind of example...
https://www.renpy.org/doc/html/python.html
https://www.renpy.org/doc/html/label.html
https://www.renpy.org/doc/html/screens.html
https://www.renpy.org/doc/html/screen_actions.html
Code: Select all
default days_spent = 0
default can_click = False
define me = Character("Me")
image white:
Solid("#fff")
size (150, 150)
image blue:
Solid("#00f")
size (450, 150)
screen days_scr():
frame:
align (0.05, 0.05)
vbox:
spacing 10
text "~~~~~~~~~~"
text "Days spent - [days_spent]"
text "~~~~~~~~~~"
screen bed_scr():
button:
align (0.5, 0.5)
hbox:
add "white"
add "blue"
action Jump("sleep_time")
sensitive can_click
# The game starts here.
label start:
"..."
show screen bed_scr with dissolve
"... ..."
show screen days_scr with dissolve
$ can_click = True
label game_loop:
if days_spent < 4:
me "I woke up..."
label loop_1:
me "It's so dark around..."
me "I hardly see the bed."
"~ search some around ~"
me "Oh, there's nothing else here but this bed."
jump loop_1
elif days_spent < 7:
me "I woke up..."
label loop_2:
me "Yeah, hello darkness..."
me "...hello, bed."
"~ no unswer ~"
me "Am I going crazy?..."
jump loop_2
else:
$ can_click = False
me "I woke up..."
"Is it sunday already ?!!!11"
"the end."
return
label sleep_time:
$ can_click = False
"Got to sleep some..."
hide screen bed_scr with dissolve
"ZzzZzzZzzz..."
$ days_spent += 1
show screen bed_scr with dissolve
$ can_click = True
jump game_loop
https://www.renpy.org/doc/html/label.html
https://www.renpy.org/doc/html/screens.html
https://www.renpy.org/doc/html/screen_actions.html
Who is online
Users browsing this forum: Google [Bot]