Example:
Code: Select all
image man1:
"man1_1"
0.2
"man1_2"
0.2
"man1_3"
0.2
repeat
Code: Select all
def animationsfunction(image,x,y):
while True:
renpy.show (image + '_1',at_list=[Position(xanchor = 1, yanchor = 1,xpos=x,ypos=y)])
renpy.pause(0.2)
renpy.hide(image + "_1")
renpy.show (image + "_2",at_list=[Position(xanchor = 1, yanchor = 1,xpos=x,ypos=y)])
renpy.pause(0.2)
renpy.hide(image + "_2")
renpy.show (image + "_3",at_list=[Position(xanchor = 1, yanchor = 1,xpos=x,ypos=y)])
renpy.pause(0.2)
renpy.hide(image + "_3")
So calling:
$animationsfunction("image1",50,50)
$animationsfunction("image2",150,150)
will only display image1.
Is there a better way? Either by improving on this function so it can run multiple times, or by using a better renpy alternative?