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.

Newcomers DBPro Corner / Printing over sprites

Author
Message
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 25th Apr 2009 09:30
Hi,

Question is fairly simply; how do I print text over sprites.

Thanks for you help,

Lucas
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 25th Apr 2009 10:24


Dark Physics makes any hot drink go cold.
feiting shadow
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 25th Apr 2009 11:18
science of it: Last thing drawn = top of screen. (just to add the how to how's snippet, lol)

Signed
------
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 25th Apr 2009 13:05
Thanks for your help but I'm afraid I still don't quite understand how that works...

When I tried it at first, the text showed up but all of the sprites disapeared.

When I try repeating the drawing of the sprite rather than the showing of the sprite, it said that the sprite already existed.

Any help would be greatly apreciated.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 25th Apr 2009 14:16
first make sure that



is on the outside of your do loop

then make sure the text is the last thing that printed.

then do a sync.

Dark Physics makes any hot drink go cold.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 26th Apr 2009 22:54
OR

whenever you do SPRITE, use PASTE SPRITE after it and hide the original sprite. Just make sure the SPRITE and PASTE SPRITE coordinates match . For example, if your sprite number was 1, you might change this:

SPRITE 1,0,0,1

to this:

SPRITE 1,0,0,1
HIDE SPRITE 1
PASTE SPRITE 1,0,0

<---Spell casting battle game!
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 27th Apr 2009 03:48 Edited at: 27th Apr 2009 03:49
Of course it would be easier to use a function for that:




Then simply call like this: PasteSprite( 1, 0, 0, 1 )
Where the parameters are the same as the Sprite command.


[edit]

Remember to call the CLS command after you refresh the screen, of course.

Login to post a reply

Server time is: 2024-11-24 09:00:52
Your offset time is: 2024-11-24 09:00:52