Hi,
For my first project I have been looking into making a clock. For that I have created "calendar" class with a method that adds the specified amounts of seconds to it, and I called this method in a while loop. But when I run the game, the while loop requires clicking to enter a new loop. I would like to make a while loop that doesn't require clicking to loop again, ideally every second. I have looked into timers, but I saw that they worked with the "action" keyword, but it doesn't seem to be usable in python language, and in renpy it doesn't allow calling python methods, so I ran into a wall.
I would appreciate any help (my current class and while loop are attached to this topic)
Making an automated "while" loop ?
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.
- Ocelot
- Lemma-Class Veteran
- Posts: 2405
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Making an automated "while" loop ?
Code: Select all
screen show_calendar(calendar):
timer 1 repeat True action Function(calendar.AddTime, 15)
$ text = calendar.Output + " " + calendar.DayTime()
label '[text]'
label start:
# Make sure calendar is set up
show screen show_calendar(calendar)
# Text should appear in the top left corner with time.
< < insert Rick Cook quote here > >
Re: Making an automated "while" loop ?
Hey, thank you very much for the quick answer
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot], Tony_Tan