sprite jumping on expression change

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
slyfoxxy
Regular
Posts: 46
Joined: Mon Jul 02, 2012 8:13 pm
Projects: Dragon's Blood, Swan Song
Location: Adelaide, South Australia
Contact:

sprite jumping on expression change

#1 Post by slyfoxxy »

EDIT - I solved the problem by putting him in the center but is there any way to prevent this problem if he is on the side?


Hi there I'm just needing help with the fact that my sprites keep jumping once I change from their original neutral position to another expression, for example:

Starting position neutral:

Image

to surprised -

Image

and from surprised to grin it doesnt move -

Image

but when I put it back to neutral it goes back to the original position -

Image


my code is just -

show rein neutral at left with moveinleft

then the text then

show rein surprised

text

show rein grin

text

show rein neutral

his is the only one that does it too, could it be png/sprite size? I don't know because they are all the same size...
Dragon's Blood on Facebook: Dragon's Blood

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

Re: sprite jumping on expression change

#2 Post by Alex »

Check on your sprites for "rein"- are they match eachother or "rein surprised" has more transparent canvas at left.

User avatar
slyfoxxy
Regular
Posts: 46
Joined: Mon Jul 02, 2012 8:13 pm
Projects: Dragon's Blood, Swan Song
Location: Adelaide, South Australia
Contact:

Re: sprite jumping on expression change

#3 Post by slyfoxxy »

they are all the same, and if I put him in the center instead of to the left or right it works fine, his sprite is the only one that does it as well so I dont know what it could be.
Dragon's Blood on Facebook: Dragon's Blood

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

Re: sprite jumping on expression change

#4 Post by Alex »

It's ok to put them in the center, 'cause there are enough free space onscreen to show them (the centers of both images are the same and sides might not match), but when you put them to the left side of screen, then images are placed with their left sides at the same place and it causes the "move aside" effect. Could you post your sprites?

Levrex
Veteran
Posts: 280
Joined: Mon Jun 18, 2012 12:16 pm
Contact:

Re: sprite jumping on expression change

#5 Post by Levrex »

If that's the case, you can simply re-define all the positions. Albeit i don't think that's the case.

Code: Select all

$ left = Position(xpos=0.25, xanchor='center')
$ center = Position(xpos=0.5, xanchor='center')
$ right = Position(xpos=0.75, xanchor='center')
Of course, that will only work properly for all sprites if all the sprites have the same stance, i.e. faced towards you or another only direction.
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.

Post Reply

Who is online

Users browsing this forum: Google [Bot]