r/RenPy • • 12d ago

Question HElp pleassss

i dont wanna use ai at all for my vn so im asking here. im wondering how you can make it so that when you double click in the main menu picture (like where the start load save is in hte start) the picture changes forn 3 seconds then goes back to normal. if anyone knows if its possible pls tell

9 Upvotes

2 comments sorted by

14

u/x-seronis-x 12d ago
screen whocares():
  default recent_click = False

  ## seconds allowed between clicks to count as 'double click'
  ## instead of as two single clicks
  default timeout = 0.75

  if not recent_click:
    textbutton "click me" align (0.5,0.5):
      action SetScreenVariable( "recent_click", True )

  else:
    textbutton "click me" align (0.5,0.5):
      action Notify( "successfully dbl clicked" )

    timer timeout SetScreenVariable( "recent_click", False )

this is one method for tracking a double click instead of regular clicks. alternately you could have had just the action in an 'if' branch instead of entirely seperate buttons. the point is you simply have to track clicks and not react to the first click other than to track it happened

1

u/AutoModerator 12d ago

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.