Only repeat part of a transform ATL help [solved]

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
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Only repeat part of a transform ATL help [solved]

#1 Post by Scribbles »

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....?)

Code:

Code: Select all

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.
Image - Image -Image

User avatar
RicharDann
Veteran
Posts: 286
Joined: Thu Aug 31, 2017 11:47 am
Contact:

Re: Only repeat part of a transform ATL help

#2 Post by RicharDann »

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:

Code: Select all

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
The most important step is always the next one.

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Only repeat part of a transform ATL help

#3 Post by Scribbles »

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:

Code: Select all

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! )
Image - Image -Image

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Only repeat part of a transform ATL help

#4 Post by philat »

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.

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Only repeat part of a transform ATL help

#5 Post by Scribbles »

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
Image - Image -Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]