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.

Author
Message
Justice
14
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 12th Mar 2015 19:16
Hi,

I thought I would try making a game with sprites. (only made 3d games before)

In my game im bouncing a ball around the screen, I have other sprites on the screen.

My bouncy ball appears to go behind the other sprites, I would like my ball to appear in front of any other sprites on the screen.

Is there a basic sprite command to do this ?
Sasuke
13
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 12th Mar 2015 19:38 Edited at: 12th Mar 2015 19:44
SET SPRITE PRIORITY

This will set the sprite order at which they draw at. All sprites have a default priority of 0 so setting it to 1 will cause it to be drawn after all sprites 0 meaning it will sit on top of them. You can set it to whatever to give each sprite a different priority. The best way to handle this is create a unique priority for each type of sprite. So all background ones will be 0, level parts could be 1 and so on.

"Get in the Van!" - Van B
Justice
14
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 12th Mar 2015 22:15
Thank you very much for your help.

Login to post a reply

Server time is: 2019-02-23 01:29:37
Your offset time is: 2019-02-23 01:29:37