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.
Title says it all, mostly. I was using just a normal count number alongside the screen I have going with a timer on it but if the person happens to go backwards for whatever reason, the timer variable may go back to where it was but the generic countdown amount does not. So I was wondering if I could use the variable itself and put it on screen in the top right?
image countdownlong:
DynamicDisplayable(countdown, length=30.0)
xalign 1.0 yalign 0.0
default tim = 0
screen timer_swap():
timer 1 repeat True action SetVariable("tim", tim + 1)
label whatevertheheck:
show countdownlong
show screen timer_swap
"Blah blah dialogue/menu/whatever"
## If they go back to this spot or another, the countdown continues regardless, desyncing it from the "tim" variable. Thus the problem.
"Fluff fluff fluff."
"Fliff fliff fliff."
if tim >= 30:
hide timer_swap
hide countdownlong
jump thesolutiontothisproblem
else:
"Working as intended."
The docs for DynamicDisplayable say "function is called at the start of every interaction". Could it be that every single say-statement resets the countdown?
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)