[SOLVED] Simultaneous transition

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
PhZXgames
Regular
Posts: 49
Joined: Fri Oct 14, 2016 2:12 pm
Completed: Character Creation Frame
Projects: RWBY Dawnfall
Organization: PhZX Games
Skype: live:phzxgames
Location: Minnesota, USA
Contact:

[SOLVED] Simultaneous transition

#1 Post by PhZXgames » Thu Dec 29, 2016 3:45 pm

This has been brought up before on this forum but I want to ask it for myself; Is it possible to use multiple transitions simultaneously?

Like, I'm using hpunch, which shakes the screen horizontally (side to side), and vpunch which does the same thing, only vertically (up and down). Could it be possible to do them at the same time for a diagonal effect?

Another thing would be like the dissolve transition and the pixelate transition. Could I do both at once, and if so how?

thanks!
Last edited by PhZXgames on Fri Dec 30, 2016 7:32 pm, edited 1 time in total.
"Don't Explode!"
-me

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

Re: Simultaneous transition

#2 Post by Imperf3kt » Fri Dec 30, 2016 2:27 am

Have you considered defining the animations as images and then call both "images"?
for example, I did a very similar thing in my own VN recently.
I have a spinning portal .. thing.
It fades in alongside some "twinkling" while spinning, while doing a sort of warping effect.
If you count it up, that's; twinkling effect (1) fade in (2) rotate (3) ATL effect (4)
So four animations simultaneously, three on the one "image"

top of script.rpy

Code: Select all

# Animations
image twinkle:
    "twinkle1" with Dissolve(0.5, alpha=True)
    pause 0.6
    "twinkle2" with Dissolve(0.5, alpha=True)
    repeat 6
    
image warptastic:
    "g10"
    pause 0.05
    "g11"
    pause 0.05
    "g12"
    pause 0.05
    "g13"
    pause 0.05
    "g14"
    pause 0.05
    "g15"
    pause 0.05
    "g16"
    pause 0.05
    "g17"
    pause 0.05
    "g18"
    pause 0.05
    "g19"
    pause 0.05
    "g20"
    pause 0.05
    "g21"
    pause 0.05
    "g22"
    pause 0.05
    "g23"
    pause 0.05
    "g24"
    pause 0.05
    "g23"
    pause 0.05
    "g22"
    pause 0.05
    "g21"
    pause 0.05
    "g20"
    pause 0.05
    "g19"
    pause 0.05
    "g18"
    pause 0.05
    "g17"
    pause 0.05
    "g16"
    pause 0.05
    "g15"
    pause 0.05
    "g14"
    pause 0.05
    "g13"
    pause 0.05
    "g12"
    pause 0.05
    "g11"
    pause 0.05
    "g10"
    pause 0.05
    repeat
These are the individual frames of the animations and make up twinkle (1) and ATL (4)
To use them in-game, I simply called them both as an image.

Code: Select all

    scene forest
    with None
    show twinkle
    $ renpy.pause(3, hard=True)
show warptastic:
        xpos 0.5 ypos 0.5 xanchor 0.5 yanchor 0.5
        rotate 0
        linear 3 rotate -360
        repeat
    with dissolve
Don't forget to define the initial images:
Image
Hope this helps.

User avatar
PhZXgames
Regular
Posts: 49
Joined: Fri Oct 14, 2016 2:12 pm
Completed: Character Creation Frame
Projects: RWBY Dawnfall
Organization: PhZX Games
Skype: live:phzxgames
Location: Minnesota, USA
Contact:

Re: Simultaneous transition

#3 Post by PhZXgames » Fri Dec 30, 2016 3:16 am

I get where you're coming from, but I feel like there should be a way to do it with less work involved. I understand it may not be as simple as a string, but even a five line block would be easier to work with.

I would use the idea only if there was no other way, but so far it does seem to be the only viable option.

Thanks!
"Don't Explode!"
-me

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Simultaneous transition

#4 Post by Divona » Fri Dec 30, 2016 4:51 am

The most straight forward way is to use ComposeTransition(). You can mix up to three transitions at once. Here is an example how to use it to have Dissolve and Pixellate at once:

Code: Select all

show mysprite with ComposeTransition(Dissolve(3.0), before=pixellate)
But I still recommend using ATL, though. It's much more flexible and capable at taming those animation and transitions.
Completed:
Image

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], minyan