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.
I am creating a screen with a countdown timer. The timer text blinks in and out, which I have achieved by putting it on a separate screen from everything else that dissolves in and out of existence.
However, while the screen is dissolving, I can't click the imagebuttons of the base screen, even though they are not covered by the additional screen. Is there some way to work around this?
Thanks for the reply, but this code doesn't quite achieve what I'm after. It allows me to make a given text element blink, but it doesn't work all that well when trying to update the text during the countdown. I tried combining it with a modified version of the countdown code proposed by tuna_sushi here, but I didn't manage to quite sync the blinking transform and the countdown code.
One alternative I've tried to work on is to use individual text displayables with your suggested transform for each number in the countdown, but I don't know how to get them to appear after a certain amount of time has passed (they would all have to appear with one second intervals). I've tried to use a timer with a custom function, but then nothing happens (probably because I don't actually know exactly how to construct this specific function):
init python:
def countertext(num):
ui.text("%.0f" % num)
screen clicktest():
$ n = countertime
for i in range(1,countertime+1):
timer i-0.99 action Function(countertext,n)
$ n -= 1
I think the best thing would be if there was some way to override a dissolving screen making buttons unclickable, but I don't know if that's possible.
Mmm, what's the problem with syncronizing the blinking with the countdown? The transform takes exactly 1 second, so it should be perfectly sync with timer...