[Solved] How to wipe from center?

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
unregistered
Newbie
Posts: 17
Joined: Tue Apr 21, 2020 5:18 am
Contact:

[Solved] How to wipe from center?

#1 Post by unregistered »

I need to create a transition that's wiping from center. So starting from the middle of the screen and wiping left and right simulanteously. By default, Renpy only supports wiping in one directions at once.

I managed to wipe with this simple ATL:

Code: Select all

"image"
    size (1,1080) crop (960,0,1,1080)
    ease 1.0 size (1920,1080) crop (0,0,1920,1080)
However, now I'm not sure how to use this as a possible transition over my screens. Using alpha 0.0 here just makes my whole image dissapear, not just the parts that are not wiped, yet. Not using alpha makes the image below disappear and wipe from black. So what I need is having everything outside the crop be an alpha.

So my question is: What's the best way to achieve such a wipe from center? Can anyone help me?
Last edited by unregistered on Fri Oct 16, 2020 10:43 pm, edited 1 time in total.

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: How to wipe from center?

#2 Post by rayminator »

you need to post your code what you are using

unregistered
Newbie
Posts: 17
Joined: Tue Apr 21, 2020 5:18 am
Contact:

Re: How to wipe from center?

#3 Post by unregistered »

you need to post your code what you are using
The ATL code was posted above. I actually didn't do much more then showing it on top of the the image to be wiped over. ATL just didn't preserved the alpha.


However, I just realized, that CropMove() actually allows for the definition of a custom Crop-Move transition. So it's actually much easier. This just gave me a new wipecenter transition without any issues:

Code: Select all

define wipecenter = CropMove(1.0, mode="custom", startcrop=(0.5, 0.0, 0.0, 1.0), startpos=(0.5, 0.0), endcrop=(0.0, 0.0, 1.0, 1.0), endpos=(0.0, 0.0), topnew=True)
This also does preserve the alpha like it should and works much more fluent.

But thanks anyway! Greatly appreaciated! :)

Post Reply

Who is online

Users browsing this forum: Google [Bot]