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'm trying to create a lightning effect by flashing the screen. My problem here is the random part. I want my flashes to appear after a random time, so I thought about using a transform I could apply on a white image.
This is the transform code I'm using, but the randomized pause seems to always last 1 sec (the minimum I set in my randint)
Is it possible to get some random in transforms ? Because I guess the "renpy.random.randint" function doesn't work in a transform. Or am I misunderstanding the whole thing ?
I'd also like to get a screenshake everytime the flash appears. Should I do it with another transform ? How can I get it to sync with the flashes ?