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.
Unfortunately, it seems clicking interrupts the timer, preventing the second notification from displaying. Is there a way to keep this from happening? Or perhaps a better way to do what I'm trying to do?
Last edited by JustaHelpfulLurker on Mon Jan 15, 2018 4:09 pm, edited 1 time in total.
screen my_notify(messages):
for n, i in enumerate(messages):
timer n*4 action Notify(i)
label start:
show my_notify(["This is the first message", "This is the second Message", "This is the third message"])
pause
screen my_notify(messages):
for n, i in enumerate(messages):
timer n*4 action Notify(i)
label start:
show my_notify(["This is the first message", "This is the second Message", "This is the third message"])
pause
Thank you! It worked after a couple changes. This is what it looks like now:
screen my_notify(messages):
for n, i in enumerate(messages):
timer max(0.01,n*4) action Notify(i)
timer len(messages)*4 action Hide('my_notify')
label start:
show screen my_notify(["This is the first message", "This is the second message", "This is the third message"])
pause
The extra 0.01 seconds were added because the timer has to be >0.
EDIT 1: It only works the first set of notifications. Trying to show the screen again later doesn't work for some reason.
EDIT 2: The screen just needs to hide once all the notifications have displayed. Updated the code.