LoginLogin
Might make SBS readonly: thread

[SB4] SPANIM Making sprite visual jump when anim starts?

Root / Programming Questions / [.]

TennoHackCreated:
I'm making a bottom up shooter, and it came time to add my first enemy, the first sprite that was going to have an animation (1210-1212) First I was using
SPANIM ENEMY,"I","@ENEMYANIM",0

@ENEMYANIM
DATA 3
DATA 5,1210
DATA 5,1211
DATA 5,1212
and the enemies would start where I put them, and then the next frame, when the animation starts, the sprite visuals (and only the visuals, the sphome, collision box, ect would stay as is) would shift down and right, and thanks to my godsend of a Debug mode i added, I can see that the Home of the sprite was being set to the bottom right corner of the collision box. Now I changed it up using "UV" to see if it would help.
SPANIM ENEMY,"UV","@ENEMYANIM",0

@ENEMYANIM
DATA 3
DATA 5, 192,288
DATA 5, 208,288
DATA 5, 224,288
Technically, tmk, this code should lead to the same exact result, and it does, except now my enemy's sprite visuals jump to the Top Left corner of the hitbox! Does anyone know why this is happening and how to fix it? I'm at a loss here. !!EDIT!! I'm stupid. The SPHOME was actually just being set to 16,16 instead of 8,8. The anim was making it look like it was jumping but the problem was infact with SPHOME. Sorry! Ignore me.