character images overlap by default (?)
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.
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.
character images overlap by default (?)
hahaha no, no help.
Last edited by Mikan on Sat Oct 16, 2010 6:08 pm, edited 1 time in total.
Re: character images overlap by default (?)
The problem is different depending on what you actually want to happen.Mikan wrote:Heya Ren'py community.
My character images are overlapping, and I don't know how to prevent this.
Basically, Ren'Py kind of groups images by their 'tag', which is the first whole word of the name you give them. And when you display a new image, if there's one already displayed with the same tag, it'll remove that one before displaying your new image. So if you have several sprites for the same character, it's best to give them names which all consist of the same tag, followed by a space, followed by a more descriptive name, e.g.:
Code: Select all
image girl happy = "happygirl.png"
image girl sad = "sad.png"
image girl neutral = "standing.png"
Code: Select all
show girl happy at left
girl "I'm happy!"
show girl sad at left
girl "Now I'm sad!"
If you have several sprites for the same character which don't have the same tag, then you'll have to hide the previous one before displaying the new one, e.g.
Code: Select all
show happy girl at left
girl "I'm happy!"
hide happy girl
show sad girl at left
girl "Now I'm sad!"
On the other hand, if your problem is simply that you're trying to show several different characters and they're all stacking up on top of each other, then the solution is to change the 'at left' at the end of the show statements to something else. "at right" or "at center" might be good places to start.
Server error: user 'Jake' not found
Re: character images overlap by default (?)
Wow... so I guess I should stick on a "Hide" comment after every image?
Good thing there's a replace function in the editor.
In the above dialog, different characters are taking turns talking.
When one character is done talking, the next character shows up, and so forth...
oh, and:
Good thing there's a replace function in the editor.
In the above dialog, different characters are taking turns talking.
When one character is done talking, the next character shows up, and so forth...
oh, and:
I'd also like to make it so that there's a margin on the left and right of the game so that the images wern't so close to the edges, but I'm not sure how to do this either.
-
- Regular
- Posts: 94
- Joined: Mon Dec 24, 2007 11:09 am
- Projects: Ren'Py Russian distributive
- Location: Уфа, РБ, Россия
- Contact:
Re: character images overlap by default (?)
Hm, maybe you would want to show different characters on different locations? Not only 'at left', but 'at center' or even 'at right'? Else you have to hide one character and then show another on his/hers place.Mikan wrote:In the above dialog, different characters are taking turns talking.
When one character is done talking, the next character shows up, and so forth...
Maybe just leave some space is char sprites? Only way without it I could come up is redifining positions...I'd also like to make it so that there's a margin on the left and right of the game so that the images wern't so close to the edges, but I'm not sure how to do this either.
But still, I am also newbie.
<feels sowwy for his Engrish>
-
- Eileen-Class Veteran
- Posts: 1265
- Joined: Fri Aug 31, 2007 7:02 am
- Projects: 0 completed game. Still haven't made any meaningfully completed games...
- Contact:
Re: character images overlap by default (?)
Yeah I think that your options.000 wrote:Maybe just leave some space is char sprites? Only way without it I could come up is redifining positions...
To redefine positions put the new coordinates like so:
Code: Select all
init:
$ JQuartz_right= Position(xpos=0.2,ypos=0.5,xanchor=0,yanchor=0)
Code: Select all
show pizza at JQuartz_right
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.
Re: character images overlap by default (?)
Oh, cool. This seems more on par with what I need.JQuartz wrote:And use it like so:Code: Select all
init: $ JQuartz_right= Position(xpos=0.2,ypos=0.5,xanchor=0,yanchor=0)
Code: Select all
show pizza at JQuartz_right
Thanks a lot!
Re: character images overlap by default (?)
You know, you could just read the Ren'Py Quickstart guide, which answers your questions. Namely this section:
http://www.renpy.org/wiki/renpy/doc/tut ... Quickstart
You can learn by asking questions, but all the questions you ask are answered right there.
Might want to read that part a few times especially, since you hide all your images manually, when you do not even have to do that.
It's a good idea to read up on Ren'Py, since you are using it.
Maybe you don't know where the Ren'Py Quickstart guide is. This is understandable, as it is located in a very difficult-to-find area of the deepest reaches of the internets: The Ren'Py site.The first part of an image name is the image tag. If an image is being shown, and another image with the same tag is on the screen, then the image that's on the screen is replaced with the one being shown. This happens on line 19, the second show statement. Before line 19 is run, the image "sylvie smile" is on the screen. When line 19 is run, that image is replaces with "sylvie surprised", since they share the "sylvie" tag
http://www.renpy.org/wiki/renpy/doc/tut ... Quickstart
You can learn by asking questions, but all the questions you ask are answered right there.
Might want to read that part a few times especially, since you hide all your images manually, when you do not even have to do that.
It's a good idea to read up on Ren'Py, since you are using it.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: character images overlap by default (?)
A22's post is exactly what we don't need on the forum. I'd rather have a thousand newbie questions, which get answered politely and turn people into welcomed members, than have this place turn into a Megatokyo DSVN forum hotbed of RTFMism.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Amazon [Bot], giorgi1111