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.

Dark GDK / How to make multiple sprites correctly

Author
Message
Joe21
11
Years of Service
User Offline
Joined: 24th Apr 2012
Location:
Posted: 26th Apr 2012 17:58
I still am having trouble trying to get multiple sprites of the same picture to be displayed on the screen. For some reason, I can only get one sprite of the picture to show even though I create 6 sprites with different sprite Ids of that picture.

The way I have it set up is I use dbCreateAnimatedSprite() and then use dbSprite() 6 times after with different SpriteIds. Is this the wrong way to do it?

What parts of dbCreateAnimatedSprite and dbSprite have to have the same Id?
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 26th Apr 2012 23:16
I'm not sure what is wrong, but I think you could try this:

create 1 animated sprite.
Hide that sprite.
for each sprite on the screen, set the sprite frame and then dbPasteSprite

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-04-20 14:32:59
Your offset time is: 2024-04-20 14:32:59