How to place half sprite on bottom left

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
Ezaki
Newbie
Posts: 21
Joined: Thu Dec 27, 2012 1:24 am
Contact:

How to place half sprite on bottom left

#1 Post by Ezaki »

First things first, I would like to say hello. I'm trying to put a half body sprite for the main character on the bottom left on top of the textbox. When I put

Code: Select all

label start:
    show bedroom
    show mc_happy
    r"Ah, what a beautiful day!"
   
It turns to this, Image

So I changed the code to,

Code: Select all

label start:
    show bedroom
    show mc_happy on bottom left
    r"Ah, what a beautiful day!"
   
   
    return
And it turns like this, Image

Which part did I do wrong? :c

TerracottaPie
Regular
Posts: 40
Joined: Wed May 15, 2013 4:28 am
Organization: Hikage Studios, Leveretta dev.
Location: Australia
Contact:

Re: How to place half sprite on bottom left

#2 Post by TerracottaPie »

The side sprites are coded differently. First, when defining their image you want to define them with "image side"

Code: Select all

image side mc happy = "spritename.png"
Naturally you'd change the filename and 'mc happy' to whatever is appropriate for you.

When the character says something the "show" command is not used. Instead it'd be done as follows where 'mc' is what the character is defined as in this case:

Code: Select all

mc happy "blahblahblah"
Now the Character defined as "mc" will display the "mc happy" image along with the text "blahblahblah". When done this way the sprite can only be displayed when that character is talking.

Or, you know, you can check the documentation here:
http://www.renpy.org/doc/html/side_image.html

The documentation exists for a reason, as does the tutorial game. It's a good idea to check those before anything else.

User avatar
Ezaki
Newbie
Posts: 21
Joined: Thu Dec 27, 2012 1:24 am
Contact:

Re: How to place half sprite on bottom left

#3 Post by Ezaki »

Thank you. Now I managed to place the sprite on the left but it blocks the text. I don't know where to put this code

Code: Select all

init python:
     style.window.padding_left = 150
or how to fix it.. :C

TerracottaPie
Regular
Posts: 40
Joined: Wed May 15, 2013 4:28 am
Organization: Hikage Studios, Leveretta dev.
Location: Australia
Contact:

Re: How to place half sprite on bottom left

#4 Post by TerracottaPie »

The only example of my own that I can readily access involves a 'dynamic character'.

Code: Select all

    init:
        $ mcname = ""
        $ mc = DynamicCharacter("mcname", color=(192, 64, 64, 255), window_left_padding=160, image="mc")
But you might be able to add the window padding directly to the character as in this example. Something like:

Code: Select all

define mc = Character('Name here', color="#95aeb7", window_left_padding=160)
I don't know if it'll work but it's all that's coming to mind without checking the documentation.

User avatar
Ezaki
Newbie
Posts: 21
Joined: Thu Dec 27, 2012 1:24 am
Contact:

Re: How to place half sprite on bottom left

#5 Post by Ezaki »

TerracottaPie wrote:The only example of my own that I can readily access involves a 'dynamic character'.

Code: Select all

    init:
        $ mcname = ""
        $ mc = DynamicCharacter("mcname", color=(192, 64, 64, 255), window_left_padding=160, image="mc")
But you might be able to add the window padding directly to the character as in this example. Something like:

Code: Select all

define mc = Character('Name here', color="#95aeb7", window_left_padding=160)
I don't know if it'll work but it's all that's coming to mind without checking the documentation.
The second code worked! You're a genius ~! I love youuu ~~ :D Thank you very much.

Post Reply

Who is online

Users browsing this forum: No registered users