animation doesn't repeat

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
User avatar
Cboom
Newbie
Posts: 6
Joined: Thu Aug 12, 2021 8:19 pm
Contact:

animation doesn't repeat

#1 Post by Cboom »

I have an animation:

Code: Select all

image snowy:
    animation
    "snow"
    ypos 0
    linear 6.0 yoffset 1200
    repeat
but it doesn't repeat, i guess is for the transforma, because in animations without the transforms it works, so, how can i make it repeat?

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: animation doesn't repeat

#2 Post by Ocelot »

It actually does repeat. But you don't see it.

What happens:
1) Displayable is created with default values
ypos = 0, yoffset = 0
2) transfrorm starts and sets ypos to 0, notice how it does not change yoffset
ypos = 0 yoffset = 0
3) yoffset changes linearly to 1200
ypos = 0 yoffset = 1200
4) Animation starts to repeat, ypos is set to 0, yoffset is not changed and remains 1200
ypos = 0 yoffset = 1200
5) Yoffset is linerly changed to 1200 from its previous value (1200). Which means it isn't actually changed
ypos = 0 yoffset = 1200
... repeat 4-5

In short: you are setting and changing different properties.
< < insert Rick Cook quote here > >

User avatar
Cboom
Newbie
Posts: 6
Joined: Thu Aug 12, 2021 8:19 pm
Contact:

Re: animation doesn't repeat

#3 Post by Cboom »

Ocelot wrote: Thu Jan 13, 2022 4:59 pm It actually does repeat. But you don't see it.

What happens:
1) Displayable is created with default values
ypos = 0, yoffset = 0
2) transfrorm starts and sets ypos to 0, notice how it does not change yoffset
ypos = 0 yoffset = 0
3) yoffset changes linearly to 1200
ypos = 0 yoffset = 1200
4) Animation starts to repeat, ypos is set to 0, yoffset is not changed and remains 1200
ypos = 0 yoffset = 1200
5) Yoffset is linerly changed to 1200 from its previous value (1200). Which means it isn't actually changed
ypos = 0 yoffset = 1200
... repeat 4-5

In short: you are setting and changing different properties.
oh, i see, thank you!

Post Reply

Who is online

Users browsing this forum: Alex