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
Aarbear
15
Years of Service
User Offline
Joined: 29th Apr 2011
Location: New York
Posted: 9th May 2011 06:17
I just recently noticed that there is a dbpro newbie section, so I have no idea if questions like these should be here or there.

I've got a health integer that contains a value of 100. I'd like to print it on my background which happens to be a sprite. I'm having a surprisingly hard time doing this, I've tried converting to a string, I've tried displaying it before the background is displayed, I've tried displaying it after the background is displayed, I've tried using both PRINT and TEXT. Solution anyone? Thanks in advance.

Str8^
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th May 2011 08:39
You can either use paste sprite instead which will allow text to be drawn on top, or call draw sprites first (without calling CLS in the loop).

Try the search bar, this question has been asked many times.

Aarbear
15
Years of Service
User Offline
Joined: 29th Apr 2011
Location: New York
Posted: 9th May 2011 08:44
Ok, thank you. I couldn't seem to find useful on this topic.

Str8^
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 9th May 2011 08:53
Yeah do what Phaelax suggested. Pretend every sprite is hovering over the screen so if you have a sprite anywhere on the screen no matter what you do under the sprite (TEXT, PRINT, or any 2D drawing) it's still hovering above the screen so you won't see anything under the sprite. HIDE SPRITE makes it invisible to the user so you can see stuff under it. PASTE SPRITE puts a copy of the sprite on the screen like an ink stamp. Once the sprite is pasted any TEXT, PRINT, or any 2D drawing done after PASTE SPRITE will be seen.

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 10th May 2011 02:07
use the command: "draw sprites first" so the sprite will be drew on the back of the 2d text commands.
don't put this command in a loop.
Moaz
15
Years of Service
User Offline
Joined: 18th Jan 2011
Location:
Posted: 10th May 2011 03:37
Take a look HERE

Login to post a reply

Server time is: 2026-07-11 02:36:38
Your offset time is: 2026-07-11 02:36:38