Making a character sprite bounce when they start speaking

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
LMartinson
Newbie
Posts: 6
Joined: Sat Feb 25, 2017 3:46 pm
Contact:

Making a character sprite bounce when they start speaking

#1 Post by LMartinson » Thu Jul 20, 2017 2:09 pm

I'd like to have a little bounce animation occur whenever a character starts talking:

Code: Select all

transform talkbounce:
    yalign 0.0
    easein 0.17 ypos -40
    easein 0.1 ypos 0
I imagine I can adapt something from a lip flap tutorial I found:

Code: Select all

init python:
    def bounce(event, interact=True, **kwargs):
        if not interact:
            return

        if event == "begin":
            ????
But I'm not sure what code I'd need to put in ???? in order to trigger the talkbounce transform for the currently speaking character.

Pardon my noob question; I tried to figure this out on my own but had no luck. Thanks!

edgebug
Newbie
Posts: 4
Joined: Thu Jun 30, 2016 11:44 pm
Contact:

Re: Making a character sprite bounce when they start speaking

#2 Post by edgebug » Sat Oct 14, 2017 4:44 am

Sorry to necro this thread, but I'd really like to know the answer to this too...

Post Reply

Who is online

Users browsing this forum: Errilhl