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 / Image question

Author
Message
Yero008
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location: Romania
Posted: 9th Dec 2010 20:33
I'm stuck at this, please help me.
I want to paste a image on the screen if my player dies.and only after he presses enter the image to dissappear.

how can i do it? I tried dbShowSprite but it shows the image for 1 milisecond and I write this it waits for a key and then shows the image for 1 milisecond.

Forward Thanks
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 9th Dec 2010 21:26
I've never had any luck using dbWaitKey(). Try something else like:

You didn't make a sprite for (loselife), so you don't need to hide it. I personally wouldn't load and delete an image that might have use multiple times in an application..... but to each his own. Also, I don't know if you declared the "loselife" variable with an initial value-- make sure you do that.

The fastest code is the code never written.
Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 9th Dec 2010 23:04
I'd also add a "dbCLS()" before dbPasteImage(). To clear the screen n stuff.

http://ref.darkgdk.us/ <- Online DarkGDK Refernece. More content coming soon.

Login to post a reply

Server time is: 2024-09-28 14:07:21
Your offset time is: 2024-09-28 14:07:21