- image_2024-04-14_163609792.png
- (746.82 KiB) Not downloaded yet
Is it possible to add an animation when Draggable objects snaps to Droppable?
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.
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.
Is it possible to add an animation when Draggable objects snaps to Droppable?
Basically when one of the ingredients falls into (snaps to center) of the cauldron i want to have a splash animation played over the cauldron.
- m_from_space
- Eileen-Class Veteran
- Posts: 1011
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Is it possible to add an animation when Draggable objects snaps to Droppable?
There is a callable you can set when a drag finishes its snapping. So if the snap completes, just show a certain screen, or set a variable that then triggers the animation, you know best. Here are the details: https://www.renpy.org/dev-doc/html/drag_drop.html
Code: Select all
screen myscreen():
drag:
# ...
snapped mysnap_func
init python:
def mysnap_func(drag, x, y, completed):
if completed:
# trigger the animation here
Code: Select all
# ...
mydrag.snap(cauldron_x, cauldron_y, 1.0)
if completed and x == couldron_x and y == couldron_y:
...
Who is online
Users browsing this forum: Ahrefs [Bot]