- Sep 12, 2021
- 510
- 756
OK, apparently I coded myself in a corner again.
I'm using character sprites, but I want to have some leeway with their relative height (and my artist is giving them in 2x resolution).
Easy, I define them with the correct size and position:
Now, I want to keep the same sprite for scenes during daytime, nighttime and with torch/candle light (medieval fantasy setting).
I looked around and it's easy to do with a
But when I apply the transform,
the sprite ends in the top left corner (and also autofitted to the screen height, I think, for sure it's not the scale that I did set).
It's like the transform sets xypos (0,0) instead of letting the position well alone as I would expect from a well-behaved transform. Without the transform, the sprite is shown with the correct scale and position.
I can apply a second transform to adjust the position, but I believe it would be a very inelegant and inefficient solution.
I suppose I'm making a very dumb mistake down the line, but my google-fu is failing me.
(The transforms are loaded before the image declaration, if it's of any help.)
I'm using character sprites, but I want to have some leeway with their relative height (and my artist is giving them in 2x resolution).
Easy, I define them with the correct size and position:
Python:
init:
image Alice nervous:
"chars/alice-nervous-talk.png"
zoom 0.50
ypos 1.1
I looked around and it's easy to do with a
You must be registered to see the links
:
Python:
init:
transform firelit:
matrixcolor TintMatrix("#fcd390")
transform moonlit:
matrixcolor TintMatrix("#9d9ec4")
But when I apply the transform,
Python:
show BG 0_1_room
show Alice nervous at firelit
It's like the transform sets xypos (0,0) instead of letting the position well alone as I would expect from a well-behaved transform. Without the transform, the sprite is shown with the correct scale and position.
I can apply a second transform to adjust the position, but I believe it would be a very inelegant and inefficient solution.
I suppose I'm making a very dumb mistake down the line, but my google-fu is failing me.
(The transforms are loaded before the image declaration, if it's of any help.)