Help about moving characters

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
Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

Help about moving characters

#1 Post by Zearth »

Hello,
I searched for it and i found answers but it still doesn't work.
What i ask is very simply but I really don't understand why i don't success.

I want to move a character to the left side of the screen and make another character appear on the right side of the screen.
Here's my code :

Code: Select all


    show melowow at left
    with dissolve
    
    show lucynorm at right
    with dissolve
    
    l "B-bonjour."

I want add a movement to the "melowow" picture.

I read "left" and "right" were inclued in the script but it doesn't work.
My two characters appear on the center of the screen.

Help ! :(

User avatar
TsukiShima
Miko-Class Veteran
Posts: 778
Joined: Fri Aug 05, 2011 4:47 am
Projects: Heartful Memory
Location: Malaysia
Contact:

Re: Help about moving characters

#2 Post by TsukiShima »

That because you need to define you need to type as xpos and ypos instead of right or left. Or you can define it earlier, so you can use it again whenever you want, which is easier, for me.

Code: Select all

init:

    $ right = Position(ypos=360, xpos=0.7, yanchor='center')
    
    $ left = Position(ypos=360, xpos=0.2, yanchor='center')

label start:

    show melowow at left
    with dissolve
   
    show lucynorm at right
    with dissolve
   
    l "B-bonjour."

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Help about moving characters

#3 Post by Alex »

I want add a movement to the "melowow" picture.
So just add it

Code: Select all

    show melowow at center   # at first, show your image somewhere onscreen
    with dissolve
    
    show melowow at left    # then - move it to the left
    with move

    show lucynorm at right
    with dissolve
    
    l "B-bonjour."
http://www.renpy.org/doc/html/transitions.html
My two characters appear on the center of the screen.
Hm, and what is the size of your characters pictures? (if they are 800 x 600 pxls - there are no free space on the screen where to move your pictures)

Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

Re: Help about moving characters

#4 Post by Zearth »

OH ! Yes ! That's it ! My game is 1024*768 and characters pictures are same size ! Thank you ! But i don't want change the size of my characters pics, i will try what the first post explains, thank you both :)

Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

Re: Help about moving characters

#5 Post by Zearth »

It works ! Thanks a lot, you're genius !

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]