Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Sprite Priority??

Author
Message
cyrano
21
Years of Service
User Offline
Joined: 7th Dec 2002
Location:
Posted: 7th Dec 2002 07:48
Ok, I'm creating an inventory system using sprites, but when I pick the sprite item up it dissappears behind the other sprites in my inventory.

Is there any way to set the priority and bring this sprite to the front of the others?
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 7th Dec 2002 09:30
SET SPRITE PRIORITY
This command will set the relative priority of the specified sprite. All sprites start with a value of zero giving them
equal chance of being drawn last. By setting a single sprite a value of one will cause that sprite to be drawn last. You
can specify a unique priority value for each sprite creating an order of drawing for every sprite in your program.
SYNTAX
SET SPRITE PRIORITY Sprite Number, Priority
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 7th Dec 2002 09:37
Sorry that command is available in DBPro only.

The DB1X sprites are drawn in the order they were originally created in the program using the Sprite command. The last sprites estabished are the ones on top. You need to create a picked up item display sprite last and copy whatever image that you need to be displayed to it as youneed to see it.
cyrano
21
Years of Service
User Offline
Joined: 7th Dec 2002
Location:
Posted: 7th Dec 2002 15:45
Thanks.

I tried that and it works for the most part, but for some reason there's still like two sprites that are overwriting my inventory sprite even though I created it last.

Login to post a reply

Server time is: 2024-04-25 08:31:44
Your offset time is: 2024-04-25 08:31:44