image myAnimation:
"frame1.png"
0.1
"frame2.png"
0.1
"frame3.png"
0.1
repeat
Thanks, just what I needed!It depends on exactly what type of animation you're trying to create.
If you have a static image and you want to move it across the screen (example, have a character slide in from the left or right) you would use the Ren'py transform language, which allows you to move images around with easing functions and the like.
If you're trying to create the illusion of a movie by using a series of still frames, you can take advantage of the fact that every "image" in Ren'py is actually a "displayable," and can be built up using sequences of other displayables with delays between them. So, for example, you can do:
or, of course, you can just create and play a movie in the scene.Code:image myAnimation: "frame1.png" 0.1 "frame2.png" 0.1 "frame3.png" 0.1 repeat
There's a pretty good summary of the ATL (Animation and Transform Language) with a lot of examples here:You must be registered to see the links
image myAnimation:
"frame1.png"
0.1
"frame2.png"
0.1
repeat
...
add "myAnimation"
default points=10
default plus=2
default max_point=30
default clicked = True
init:
image happy
image neutral
image sad
screen clicker:
modal True
timer .5 repeat True action [If(points <= 0, true=Jump("lost"), false=SetVariable("points", points - plus))]
button:
text "[points] / [max_point]" size 40
background "#000"
xpos .5
ypos .5
xysize(300, 300)
action [SetVariable("clicked", True), If(points >= max_point, true=Jump("win"), false=SetVariable("points", points + plus)), Play("sound", "click.ogg")] #add click.ogg file to 'game' folder
if points>=20:
add "happy" xalign .3 yalign 1.0
elif points<10:
add "sad" xalign .3 yalign 1.0
else:
add "neutral " xalign .3 yalign 1.0
add "myAnimation"
image growsAsClicksAccumulate = ConditionSwitch(
"points < 5", "small.png",
"points < 10", "medium.png",
"points < 15", "bigger.png",
"points < 20", "almostThere.png",
"True", "win.png")
LOL. One of the things about Ren'py is that (a) there are approximately 683 different ways you can do something, (b) 7,921 different people have some up with solutions that are variations on those themes, (c) there are ~10 years worth of history and (d) the "best" way to do something has changed 27 times over those 10 years.So you beat your head against the desk for a few hours, turn to Google for help, and find something that works... and I just needed quotes :coldsweat:
screen add_test():
add "logo.png" xalign 1.0 yalign 0.0
Hi. Thank you. I'm using this (looking at your guidance). But I have a problem: the minimize looping between 2 frames I can do is 0.015. Even if I set it lower than that, the animation in renpy will still run with 0.015 as the fastest.It depends on exactly what type of animation you're trying to create.
If you have a static image and you want to move it across the screen (example, have a character slide in from the left or right) you would use the Ren'py transform language, which allows you to move images around with easing functions and the like.
If you're trying to create the illusion of a movie by using a series of still frames, you can take advantage of the fact that every "image" in Ren'py is actually a "displayable," and can be built up using sequences of other displayables with delays between them. So, for example, you can do:
or, of course, you can just create and play a movie in the scene.Code:image myAnimation: "frame1.png" 0.1 "frame2.png" 0.1 "frame3.png" 0.1 repeat
There's a pretty good summary of the ATL (Animation and Transform Language) with a lot of examples here:You must be registered to see the links
image myAnimation:
"frame1.png"
0.015
"frame2.png"
0.015
"frame3.png"
0.015
repeat
It's not possible. And honestly if you need to go below 0.1 second between two frames, then using Ren'py's ATL isn't the solution. You should make a real video instead. Not only it will be guaranty to be smoother, but it should also need less space.Do you know a way to set it lower than 0.015? Thanks a lot!
Thank you.It's not possible. And honestly if you need to go below 0.1 second between two frames, then using Ren'py's ATL isn't the solution. You should make a real video instead. Not only it will be guaranty to be smoother, but it should also need less space.