Sprite "sliding"

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
Rossfellow
Veteran
Posts: 283
Joined: Sun Jun 22, 2014 9:35 pm
Projects: Sedatophobia
Organization: Team 3Edgy
Deviantart: l-rossfellow
Contact:

Sprite "sliding"

#1 Post by Rossfellow »

The format I want to use for my VN is one that accommodates two sprites at a time above the textbox. I'm trying to figure out how to "move" the sprite from one side to the other without phasing out, basically "sliding" into place. I'd like to try the search but the words escape me, sorry and thank you in advance.

mjshi
Regular
Posts: 179
Joined: Wed Mar 13, 2013 9:55 pm
Completed: MazeSite01, Ponderings of Time
Contact:

Re: Sprite "sliding"

#2 Post by mjshi »

Use "moveoutright" and "moveoutleft". Examples:

Code: Select all

show sprite at left
show sprite at right with moveoutright
-or-

Code: Select all

show sprite at center
"Eileen" "Hello!"
show sprite at left with moveoutleft
"Eileen" "Nice morning, isn't it?"
and it should have a "sliding effect".

The sprite can be shown at the three default locations left, right, and center, then move left/right to the next default location.

Or, it's possible to define your own locations as well:

Code: Select all

transform [INSERT TRANSFORMATION NAME HERE]:
      xalign [VALUE between 0.0 and 1.0] #yalign [VALUE, but to have the image 'floored' keep yalign out of it]
Example of above:

Code: Select all

transform centerleft:
      xalign 0.25
Later, you would be able to use that by saying

Code: Select all

show sprite at center
"Eileen" "Hello!"
show sprite at centerleft with moveoutleft
"Eileen" "Nice morning, isn't it?"

User avatar
Rossfellow
Veteran
Posts: 283
Joined: Sun Jun 22, 2014 9:35 pm
Projects: Sedatophobia
Organization: Team 3Edgy
Deviantart: l-rossfellow
Contact:

Re: Sprite "sliding"

#3 Post by Rossfellow »

Yes, that answers it perfectly. Thank you very much!

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Sprite "sliding"

#4 Post by OokamiKasumi »

Rossfellow wrote:The format I want to use for my VN is one that accommodates two sprites at a time above the textbox. I'm trying to figure out how to "move" the sprite from one side to the other without phasing out, basically "sliding" into place. I'd like to try the search but the words escape me, sorry and thank you in advance.
Actually, you can use plain old 'move'.
-- 'moveoutright' and 'moveoutleft' are exiting or 'hiding' transitions. Images slide out of the frame to the right or left and disappear.
-- 'moveinright' and 'moveinleft' are entrance transitions. Images slide into the game's frame from the right or left.
-- To slide an image from one position to another simply use 'move'.

Example:

Code: Select all

    show elly with moveinright. #Elly slides into the frame from the Right and stops at the center. 
    e "Hi, I'm Elly!"

    show alan at left with moveinleft # Alan slides into the frame from the Left, but stays on the left side.
    a "Hi! I'm alan!"

    e "Hi Alan, come on in!"
    show elly at right with move # Elly moves from the center to the right side of the frame.

    show alan at center with move # Alan slides from the left to the center of the frame. 
    a "Thanks Elly! Much appreciated."

    e "Have fun, I gotta hot date!"
    hide elly with moveoutright # Elly slides to the right, out of the frame and disappears. 
Even if you've made custom positions you can still use 'move' to get your images there from wherever they are on the screen.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

mjshi
Regular
Posts: 179
Joined: Wed Mar 13, 2013 9:55 pm
Completed: MazeSite01, Ponderings of Time
Contact:

Re: Sprite "sliding"

#5 Post by mjshi »

@OokamiKasumi: Why hello again there ^_^

It does the same thing, does it not? :o

But I guess typing 'move' is two words less, two words saved :P Especially with transition-heavy projects, and you wouldn't need to figure out the direction to 'move' in.

Post Reply

Who is online

Users browsing this forum: akakyouryuu, GetOutOfMyLab, Google [Bot]