How to get two animated images to move simultaneously

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
beastcarving
Regular
Posts: 139
Joined: Mon May 13, 2019 5:03 pm
Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
Projects: Your Brother's Religion
Organization: BeastCarving Studio
IRC Nick: BeastCarving
Tumblr: beastcarving
Deviantart: beastcarving
Github: beastcarving
itch: beastcarving
Contact:

How to get two animated images to move simultaneously

#1 Post by beastcarving » Sun Apr 26, 2020 6:39 pm

Here's what I've got:

Code: Select all

        show Image1:
            parallel:
                alpha 1.0
                yalign 0.0
                xalign .2
                linear 1.9 yalign .1
                yalign .1
                linear .9 yalign 0.0 alpha .3
                repeat
and this is the other animated image:

Code: Select all

        show image2:
            parallel:
                alpha 1.0
                yalign 0.0
                xalign .2
                linear 1.9 yalign .1
                yalign .1
                linear .9 yalign 0.0 alpha .3
                repeat
I'd like the to make these two images move at the exact same time, rather than one after the other. Is there a way to merge two images to one movement, maybe? Or how should I go about this?
Here's what I've I've tried so far.

Code: Select all

 show image2 and Image1:
            parallel:
                alpha 1.0
                yalign 0.0
                xalign .2
                linear 1.9 yalign .1
                yalign .1
                linear .9 yalign 0.0 alpha .3
                repeat
Image Pulse Cage (full game)Image Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: How to get two animated images to move simultaneously

#2 Post by Imperf3kt » Sun Apr 26, 2020 6:45 pm

Just add a "with none" in your script.

Code: Select all

    show image1
    show image2
    with none
Might be a capital N on "none", I cannot remember.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

User avatar
beastcarving
Regular
Posts: 139
Joined: Mon May 13, 2019 5:03 pm
Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
Projects: Your Brother's Religion
Organization: BeastCarving Studio
IRC Nick: BeastCarving
Tumblr: beastcarving
Deviantart: beastcarving
Github: beastcarving
itch: beastcarving
Contact:

Re: How to get two animated images to move simultaneously

#3 Post by beastcarving » Mon Apr 27, 2020 9:00 pm

Ah, thank you! It was with a capital N. :)
Image Pulse Cage (full game)Image Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving

Post Reply

Who is online

Users browsing this forum: No registered users