Way to Slow Down Ease? (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
noeinan
Eileen-Class Veteran
Posts: 1153
Joined: Sun Apr 04, 2010 10:10 pm
Projects: Ren'Py QuickStart, Crimson Rue
Organization: Statistically Unlikely Games
Deviantart: noeinan
Github: noeinan
Location: Washington State, USA
Contact:

Way to Slow Down Ease? (solved)

#1 Post by noeinan »

I've been starting to use transformations in my dialogue, and I was wondering if there is a way to slow down the ease transition instead of me having to write a transformation for every possible starting and ending position? (Ex. I would like to be able to use "with ease" or "with slow_ease" instead of having to make a transformation dictating the starting and ending position, and then using "at easein_rightctr".)

I have been searching around the forums and can't find anything on how to do this, so I've just been doing transformations (shown below) but it is kind of bloated. I am using ease instead of move because move produces an error for some reason. (Thread on this here: viewtopic.php?f=8&t=46254 )

Code: Select all

transform easein_right:
    subpixel True
    offscreenright #starting position
    easein 2.0 right #transition, speed, ending position
    
transform easein_rightctr:
    subpixel True
    offscreenright #starting position
    easein 2.0 center #transition, speed, ending position
    
transform easeout_right:
    subpixel True
    right #starting position
    easein 2.0 offscreenright #transition, speed, ending position
    
transform easeout_rightctr:
    subpixel True
    center #starting position
    easein 2.0 offscreenright #transition, speed, ending position
Last edited by noeinan on Thu Nov 09, 2017 9:22 pm, edited 1 time in total.
Image

Image
Image

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

Re: Way to Slow Down Ease?

#2 Post by philat »

You can pass parameters to a transform.

Code: Select all

transform ease(start, end, time):
    subpixel True
    start
    easein time end
   
# as used
show image at ease(offscreenright, center, 2.0)

User avatar
noeinan
Eileen-Class Veteran
Posts: 1153
Joined: Sun Apr 04, 2010 10:10 pm
Projects: Ren'Py QuickStart, Crimson Rue
Organization: Statistically Unlikely Games
Deviantart: noeinan
Github: noeinan
Location: Washington State, USA
Contact:

Re: Way to Slow Down Ease?

#3 Post by noeinan »

Thank you! That works great and saves a lot of hassle.
Image

Image
Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]