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
DidRocks
23
Years of Service
User Offline
Joined: 28th May 2003
Location: France
Posted: 31st Jul 2003 16:11
I have a plain, a sprite and a text.
The sprite is drawn in front of my plain.
That i want is to write the text (with text command) on the sprite (so, the plain is in the back, and the sprite is backward my text).

How can i do this?
Thx
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 31st Jul 2003 17:54
I asked that same question a long time ago but I never got a real answer. My solution (I was making an FPS demo) was to just make the toolbar partially transparent so you could see the text.

Obviously this won't work if you're making a 2D game

Hopefully someone will be kind enough to reply with an answer, whether it's possible or not.

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 31st Jul 2003 18:25 Edited at: 31st Jul 2003 18:26
I hope this helps:

Paste the text onto a bitmap and then use GET IMAGE and make a new sprite. If you need to have a background on the sprite, paste the sprite image onto the bitmap before using the TEXT command.



DidRocks
23
Years of Service
User Offline
Joined: 28th May 2003
Location: France
Posted: 31st Jul 2003 18:41
thanks Rob.
I've done this already waiting for another solution, but it seems that there isn't???
DidRocks
23
Years of Service
User Offline
Joined: 28th May 2003
Location: France
Posted: 31st Jul 2003 18:42
(just an other question also: must i delete the image or the sprite first to completely erase a sprite? thanks)
DidRocks
23
Years of Service
User Offline
Joined: 28th May 2003
Location: France
Posted: 31st Jul 2003 19:31
an other thing (sorry for not editing, but when i click on "edit this post", it drives me on the main page)
I tried with this code (i created a function)



(sprit is the number of the sprite)
i call it like that:
CentreTextSurSprite(9,20,20,AffichageTouche(7) + " / " + AffichageJoy(7))

and the result is strange (to compare on the image, i made on the top a: text 1,1,AffichageTouche(7) + " / " + AffichageJoy(7))


An idea?
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 31st Jul 2003 20:18
There is no way of controlling the order of display of text / sprites as far as I know. This has long been missing from DBP.

DidRocks
23
Years of Service
User Offline
Joined: 28th May 2003
Location: France
Posted: 31st Jul 2003 20:22
what a pity ...
and for the image i obtain, do you have any idea?
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 31st Jul 2003 21:04
To erase a sprite just do DELETE SPRITE, to change the image just call SPRITE again (I don't think you have to delete it first)

DidRocks
23
Years of Service
User Offline
Joined: 28th May 2003
Location: France
Posted: 31st Jul 2003 21:26
thanks Rob
I change a little bit my code:


and to call it:
CentreTextSurSprite(210,0,0,AffichageTouche(7) + " / " + AffichageJoy(7))
sprite 210,1,1,210

So, i've a better thing but it's still strange -_- (i let the text command just upper)

nobody have a solution?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Jul 2003 21:38
Add an extra ,1 to your GET IMAGE command. That should sort it out.
DidRocks
23
Years of Service
User Offline
Joined: 28th May 2003
Location: France
Posted: 31st Jul 2003 21:59
it's that, thx a lot!
Moggie100
23
Years of Service
User Offline
Joined: 15th Oct 2002
Location: Behind You...
Posted: 1st Aug 2003 02:22
"There is no way of controlling the order of display of text / sprites as far as I know. This has long been missing from DBP."


you can set the order that sprites appear in by using the 'set sprite priority' command, but this doesnt affect text over sprites. We really need a 'Draw text to front' command that draws it over sprites & 3D.

[img]www.geocities.com/weaponsmod/Banner.gif[/img]
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 1st Aug 2003 08:21
No kidding...

It seems so obvious, lol

Thanks.

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!

Login to post a reply

Server time is: 2026-07-23 02:36:51
Your offset time is: 2026-07-23 02:36:51