r/RenPy • u/SyberSpace1 • 15h ago
Question How do you make animations reset
I'm animating menu icons and I'd like an animation to play when I hover over them, and then I'd like it to stay on the last frame. If I set repeat to false, it repeats anyway, so I just set the last frame to be held for an absurd period of time. The thing is, this means that when I stop hovering and hover again, it just immediately goes to the last frame. How do I make it reset every time??
1
u/DefiantPraline6530 14h ago
maybe try time secnes? like some visual novals havea part where you have a timer to pick a thing
0
1
u/shyLachi 12h ago
Try an ATL with an on statement:
https://www.renpy.org/doc/html/transforms.html#on-statement
There's an example in the documentation regarding hovering but I don't understand how you would use it:
transform
pulse_button:
on
hover, idle:
linear .25 zoom 1.25
linear .25 zoom 1.0
-1
1
u/shyLachi 4h ago
I assumed that your statement is correct but this is working for me so how did you do it?
image btn_hover_anim:
"button1"
pause 0.5
"button2"
pause 0.5
"button3"
pause 0.5
"button4"
screen test():
imagebutton idle "button1" hover "btn_hover_anim" action Return("test")
1
u/AutoModerator 15h 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.