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.
I can't seem to get only -part- of a transform to repeat. I am using Blocks, and only have the repeat on the part I want to loop... but it is still repeating the entire transform. I want a starting delay on the animation, but I only want the delay to happen once. I don't want the delay to happen on the second loop. I basically have 4 clouds & animations of "fog" and I am trying to make them move as naturally as possible
I am bad at ATL so any suggested changes would be appreciated but mainly I don't want the delay to repeat because I am trying to keep all 4 from starting at the same time and looking to symmetrical if that makes sense. Once they're all going it shouldn't be an issue after the initial delay?
This is just 1 of the fog ATLs. They are being shown within a screen as part of the main menu so that may limit what I can do a bit (I can't really use $ renpy.pause() there....?)
transform fog_effect_2:
block:
## I don't want this block to repeat !
alpha 0.0
xoffset -1920
pause 1.0
block:
parallel:
#This just makes them fade in/out a bit
linear 1.5 alpha 0.15
linear 1.5 alpha 0.30
linear 1.5 alpha 0.15
repeat
parallel:
#This makes them move from one side to the other, and then back again (still tweaking this bit)
linear 2.0 xoffset -1500
linear 2.0 xoffset -1000
linear 2.0 xoffset -500
linear 2.0 xoffset 100
linear 2.0 xoffset 500
linear 2.0 xoffset 1000
linear 2.0 xoffset 1500
linear 2.0 xoffset 1920
linear 2.0 xoffset 1500
linear 2.0 xoffset 1000
linear 2.0 xoffset 500
linear 2.0 xoffset 100
linear 2.0 xoffset -500
linear 2.0 xoffset -1000
linear 2.0 xoffset -1500
linear 2.0 xoffset -1920
repeat
Last edited by Scribbles on Sat Apr 04, 2020 8:06 pm, edited 1 time in total.
I think you don't need two block statements, or even one. The parallel statement works kinda same as block, only they begin at the exact same time and run at unison. So try:
transform fog_effect_2:
# won't repeat
alpha 0.0
xoffset -1920
pause 1.0
parallel:
#repeats
linear 1.5 alpha 0.15
linear 1.5 alpha 0.30
linear 1.5 alpha 0.15
repeat
parallel:
#repeats at the same time as previous parallel
linear 2.0 xoffset -1500
linear 2.0 xoffset 1000
# ommiting the rest to save space
repeat
RicharDann wrote: ↑Fri Apr 03, 2020 9:01 am
I think you don't need two block statements, or even one. The parallel statement works kinda same as block, only they begin at the exact same time and run at unison. So try:
transform fog_effect_2:
# won't repeat
alpha 0.0
xoffset -1920
pause 1.0
parallel:
#repeats
linear 1.5 alpha 0.15
linear 1.5 alpha 0.30
linear 1.5 alpha 0.15
repeat
parallel:
#repeats at the same time as previous parallel
linear 2.0 xoffset -1500
linear 2.0 xoffset 1000
# ommiting the rest to save space
repeat
I only added the blocks in hopes to stop the part that isn't supposed to repeat, from repeating. The pause still repeats on the second loop. This was essentially the code I started with (minus the simplified xoffset which I'll have to test to see if it moves how I want it to thanks! )
philat wrote: ↑Fri Apr 03, 2020 11:13 pm
I copy pasted your transform and ran it; the first block doesn't repeat. Unclear what you're doing, but I don't think it's the ATL.
It is working now, I updated renpy. Either I just needed some sleep and to step away for a bit or updating renpy fixed it lol