problem: character moves sideways by several pixels for no reason

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
bloobeary
Regular
Posts: 36
Joined: Fri Oct 04, 2019 3:02 pm
Deviantart: bloobeary
Soundcloud: user-212448702
Contact:

problem: character moves sideways by several pixels for no reason

#1 Post by bloobeary »

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.

Here's what I have:

I created a transform called slightleft:

Code: Select all

transform slightleft:
    xalign 0.1
    yalign 1.0
 
and I used it thus:

Code: Select all

#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.

bloobeary
Regular
Posts: 36
Joined: Fri Oct 04, 2019 3:02 pm
Deviantart: bloobeary
Soundcloud: user-212448702
Contact:

Re: problem: character moves sideways by several pixels for no reason

#2 Post by bloobeary »

Addendum:

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.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]