Transitioning between movie sprites

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.
Post Reply
Message
Author
Rubedo
Newbie
Posts: 1
Joined: Sat Apr 13, 2024 8:28 pm
Contact:

Transitioning between movie sprites

#1 Post by Rubedo »

I've got a bit of a weird request for a game I'm currently creating. What I'm trying to do is have a movie sprite play on loop (idle.webm), then when hovered over, a transition movie plays once (idletoreact.webm) before playing another movie on loop (react.webm). Then when unhovered, a second transition movie plays (reacttoidle.webm) before going back to the original idle looped movie (idle.webm). Basically, I want the movie sprite to 'react' to being hovered over and then go back to what they were doing once unhovered. Also, when hovered, the sprite needs to be clickable (so as to engage conversation).

As an example, imagine a girl is sleeping on a bed. When you hover over her, she rolls over with her eyes open (because you've woken her up by hovering over her). Then if you unhover, she rolls back over and goes back to sleep.

I believe the play_callback command should be able to handle this because it has provisions for transitioning between different movies, but it's difficult to find any real world examples of this being used.

Post Reply

Who is online

Users browsing this forum: Google [Bot]