News:

MFG's Character of the Month: September 2026 Voting

Main Menu

Problem whit parallax efect

Started by DeCeballos, August 12, 2022, 07:00:35 PM

Previous topic - Next topic

DeCeballos

Hello, can someone help me with a stage? I want to place a sprite on top of another that is type parallax and on screen this last sprite is also affected by the parallax movement of the previous sprite. Does anyone know how to avoid this?


[BG floor]
type = parallax
spriteno = 11,0
start = 0, 244
mask = 1
delta = 0.83, 0.83
xscale = 1, 1.298
yscalestart = 100
yscaledelta = 0

[BG Cell]
type = Anim
actionno = 99
start = -10, 244
mask = 1
delta = 0.866, 0.835

[BG Cell sombra]
type  = normal
spriteno = 99,3
start = -10, 244
mask = 1
delta = 0.866, 0.835

The last two are affected by the parallax of the first.

Charles_2011

Hello DeCeballos.

This is a quick recomendation, change the delta values, something like this:

[BG Cell]
type = Anim
actionno = 99
start = -10, 244
mask = 1
delta = 0.866, 0.835  ; ----> use this 0.766, 0.835

[BG Cell sombra]
type  = normal
spriteno = 99,3
start = -10, 244
mask = 1
delta = 0.866, 0.835 ; ----> use this 0.766, 0.835

Try with other values, I think that would be the problem.

DeCeballos

does not work, that makes the movement worse

Charles_2011

So, increase the value, something like this:

0.966, 0.835

DeCeballos

It doesn't work either, it doesn't seem to be due to the delta, what happens is that the last two sprites are as if they were also under the parallax effect

Agnibyte

late, but maybe the floor needs its own ID

[BG floor]
type = parallax
spriteno = 11,0
start = 0, 244
mask = 1
delta = 0.83, 0.83
xscale = 1, 1.298
yscalestart = 100
yscaledelta = 0
id = 10

maybe the others need a different one also. theirs can be the same as long as it isn't the floor's