Help with MoveTransition

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
parttimestorier
Veteran
Posts: 428
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Help with MoveTransition

#1 Post by parttimestorier » Tue Aug 11, 2020 2:39 pm

I really like the pre-defined transitions RenPy has like "moveinright", that move a character into their position from offscreen. However, they only take 0.5 seconds to do that by default, and I'd like to slow them down a bit. I know that one way to do this would be just defining a position that's offscreen, "showing" a character there where the player can't actually see them, and then later on doing something like:

Code: Select all

show character at right with MoveTransition(1.0)
And it will basically have the same effect, since they'll be moving from that offscreen position. But since it's something I want to use a lot, with characters sliding into various different positions from various sides of the screen, it's a bit annoying to have to define a bunch of different offscreen positions and "show" them there in advance of moving them in every time.

Is there a way to just define a transition that's exactly like moveinright (or any of the other movein/moveout transitions), but slower? Where it will just automatically move the character as if they're coming from offscreen right without needing me to manually put them offscreen to the right first? I realize that there's documentation about the MoveTransition that might help, but I don't entirely understand it. Thanks!
ImageImageImage

GalArt
Newbie
Posts: 10
Joined: Tue Aug 11, 2020 4:02 pm
Contact:

Re: Help with MoveTransition

#2 Post by GalArt » Tue Aug 11, 2020 4:12 pm

I guess what you are asking is explained in this video: https://youtu.be/GXNCxXLDS9s?t=280

User avatar
parttimestorier
Veteran
Posts: 428
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Re: Help with MoveTransition

#3 Post by parttimestorier » Tue Aug 11, 2020 11:23 pm

GalArt wrote:
Tue Aug 11, 2020 4:12 pm
I guess what you are asking is explained in this video: https://youtu.be/GXNCxXLDS9s?t=280
I appreciate the help, but it looks to me like what this person is doing at that point in the video, where they write code like this:

Code: Select all

init python:
     define.movetransitions("move", 1.0)
. . . would mean that every move transition I ever use would now be whatever speed I set that to. That is one way to deal with the problem depending on your purposes I guess, but ideally I'm hoping to find a way to define a new separate kind of transition that does the same thing as "moveinright" but slower. That way I could conveniently have transitions with multiple different speeds for the same kind of thing. Does anyone know if that's possible?
ImageImageImage

GalArt
Newbie
Posts: 10
Joined: Tue Aug 11, 2020 4:02 pm
Contact:

Re: Help with MoveTransition

#4 Post by GalArt » Wed Aug 12, 2020 9:48 am

Well, as she says, she later shows how to make your own custom transition, which in her case, was:

Code: Select all

define flash = Fade(0.1, 0.0, 0.5, color="#fff")
So in your case, you want the MoveTransition() like this:

define YourTransitionName = MoveTransition( duration in seconds , enter= transform, other shenanigans )

So it could look like this:

Code: Select all

define e = Character("Eileen")
define crawlinright = MoveTransition(5.0, enter=offscreenright)

label start:
	scene bg room
	e "I will enter now."
	
	show eileen happy with crawlinright
	
	e "Here I am!"
	return

User avatar
parttimestorier
Veteran
Posts: 428
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Re: Help with MoveTransition

#5 Post by parttimestorier » Wed Aug 12, 2020 2:31 pm

GalArt wrote:
Wed Aug 12, 2020 9:48 am
Well, as she says, she later shows how to make your own custom transition, which in her case, was . . .
Oh, I see! Since she started talking about animations instead after the bit I watched, I didn't realize there would be more about transitions later. Thanks for taking the time to explain!
ImageImageImage

Post Reply

Who is online

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