The Ren'Py Reference Manual: (offline | online)

Motion

Example

init:
    python:
        import math
        def Trampoline(n):
            return (0.5, 1 - math.sin(math.pi * n), 0.5, 0)

show eileen happy at Motion(Trampoline, 5.0, repeat=True, bounce=True)
            
e "Custom motions are also possible, for those times when
   you don't want to move linearly."
               
e "Don't mind me, I'm feeling a little bouncy."
               
show eileen happy
           
e "Ahem."
The Ren'Py Reference Manual: (offline | online)