Set Sprite Priority

Sets the drawing priority of a sprite.


Set Sprite Priority spriteID,priority


The priority of a sprite controls the order in which sprites appear on the screen.

spriteID is the number of the sprite.

priority is the new priority of the sprite. This can be abny value including negative numbers. The default priority of a sprite is 0.

Sprites can be placed over each other and TNT Basic determines which to put on top using their priorities. The highest priority sprite will be drawn on top.

e.g. The mouse pointer would have a high priority because it appears over the top of everything.

Note: Buttons have a priority of -1.

Table of contents