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.
I've run into a situation where one of my character sprites moves sideways by several pixels for no obvious reason. I've checked the artwork, and apart from the mouth, the two images are identical. So the problem isn't the images being different.
#display character standing behind a short wall:
show characterx behind smallwall with dissolve
x "character says something here."
#moves character out from behind wall:
show characterx zorder 1 with dissolve
show characterx at slightleft
with {'master': dissolve}
menu:
"Choice One"
jump choosedone
"Choice Two"
jump choosedtwo
label choosedone:
show characterx-mouthopen at slightleft
with {'master': dissolve}
x "Line of dialogue"
jump choosedone
label choosedtwo:
show characterx-mouthopen at slightleft
with {'master': dissolve}
x "Alternate of dialogue"
jump choosedone
label choosedone:
The problem: the character image displayed after the choice is two or three pixels to the right of the position of the position where it is displayed before the menu. This causes an unsightly jump in the character position at this point.
Could that zorder 1 be messing things up?
Is this a known bug?
I really wish we had an "infrontof" command to go along with the "behind" command.
I changed everything that was set to "slightleft" just to "left" and the pixelshift stopped happening. so it appears that the problem is that the position for "slightleft" was not an absolute.