How To

Sprite priority not working?

1

Samueljh1 2018-11-12 00:14

I’m trying to make sprite 1 display over sprite 0. This isn’t working, I’ve tried putting the attribute code in the loop aswell and explicitly setting sprite 0’s priority to 0 but that didn’t do anything either.


was8bit 2018-11-12 06:25

Sprites are funny... the rule for how they overlap are simple... they go by Sprite number.. think of a mine shaft, how deep are you?

Sprite 0 is at the very top the shaft, it blocks all other sprites
Sprite 1 is 1 level down, it is below Sprite 0 but is above all other sprites..
Sprite 2 is 2 levels down... etc, etc,


was8bit 2018-11-12 06:26

Nothing you can do about it..


Timo 2018-11-12 07:21

And the priority attribute is just for their relation with the background (BG) layers. By default sprites are always in front of the BGs, but if a BG cell has the priority attribute set, it will appear in front of the sprites. If now a sprite also has priority set, it will go to the front again.


Samueljh1 2018-11-26 00:14

Thanks for the info, got it working now :)


was8bit 2018-11-26 04:02

:)


Log in to reply.