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.
Hello. I'm working on a screensaver via RenPy. I coded the following class for ending an interaction with a return code of "1" if mouse or keyboard activity is detected (that way I know that renpy.quit() should be immediately invoked to finish the app), or return code of "0" if the timer expired (that way I can move on to the next scene of the screensaver). However, can I use pygame.USEREVENT + 1 safely, or it's used internally by RenPy?
Quite a bit of the USEREVENT space is used internally by Ren'Py - I'm not sure there are any that are safe to use by user code. Instead of using pygame directly, you should use renpy.timeout, which schedules an event to be delivered after a while.
There's no guarantee as to what the event is, but you shouldn't need one - if it isn't an event you understand, you can just treat it as a timeout, after checking st to make sure that it's occured after your timeout.
Supporting creators since 2004 (When was the last time you backed up your game?)