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.

2D All the way! / Probleme with text and sprites!

Author
Message
boris
20
Years of Service
User Offline
Joined: 26th Jun 2003
Location:
Posted: 26th Jun 2003 18:47
Hi everyone,

i want to put text on a sprite but every time the text is behind the sprite... how can i have my text in front of the sprite ?

Sorry for my english i m french
Kanzure
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 26th Jun 2003 19:17 Edited at: 26th Jun 2003 19:18
Use the TEXT command.


TEXT x,y,string$


[Other ppl says this doesn't work, but it worked for me @_@!]

~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.
boris
20
Years of Service
User Offline
Joined: 26th Jun 2003
Location:
Posted: 26th Jun 2003 19:22
it doesn t work for me

Kanzure
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 26th Jun 2003 19:27 Edited at: 26th Jun 2003 19:29
Lemme go look at my code..only be a minute.

[EDIT]
Okay.. Here is teh code I have in my game, it shows a speech box with text over it from DB. I'm sure you can modify it.


=============================
set sprite 2,0,1

show sprite 2
sprite 2,0,0,6
TEXT 5,5, "Hello!"
sleep 3000
==============================================

~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.
Snafu
20
Years of Service
User Offline
Joined: 25th Jun 2003
Location:
Posted: 26th Jun 2003 19:51
woah lol. where did this thread appear from?

Guess the mods can delete :-
http://www.darkbasicpro.com/apollo/view.php?t=12400&b=4

I have pretty much the same code, only it doesn't show the text.

basically doing:-

================================
load image "path/to/image.bmp",1
sprite 1,0,0,1
TEXT 5,5, "Test!"
================================

and nothing comes up over the sprite

- Steve

Kanzure
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 26th Jun 2003 19:53
You forgot some code ..


set sprite 1,0,1
show sprite 1



Those two lines should make it work.

~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.
Snafu
20
Years of Service
User Offline
Joined: 25th Jun 2003
Location:
Posted: 26th Jun 2003 20:01
Tried that too, still no success..

Are you using DB or DB Pro?

I had no problem doing this when I used the DB demo.

- Steve

boris
20
Years of Service
User Offline
Joined: 26th Jun 2003
Location:
Posted: 26th Jun 2003 21:30
I've db pro and i cant juste believe it! Why does it s not working

Kanzure
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 26th Jun 2003 21:35
I'm using DBC....and I'm not doing anything fast like 3D rendering, that may be why. Otherwise, I'm not the one to be helping you here @_@.

~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.
Dgamer
21
Years of Service
User Offline
Joined: 30th Sep 2002
Location:
Posted: 26th Jun 2003 23:11
Ive never tried this before. but u could probably make a bitmap, draw ur text their, use the getimage command to get the text onto an image, then make that image a sprite. now just draw the sprite above all other sprites.

The statement below is true
The statement above is false
boris
20
Years of Service
User Offline
Joined: 26th Jun 2003
Location:
Posted: 27th Jun 2003 03:45
yeah that s what i m going to do

Kango
20
Years of Service
User Offline
Joined: 27th Jun 2003
Location:
Posted: 27th Jun 2003 22:41
Hey Guys Neeed Help........When U want to make A character to u put the website where the Sprite is or the Location on ur Computer? ??? ?

Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 28th Jun 2003 02:56
Location on your computer.

I hear and I forget. I see and I remember. I do and I understand.

Login to post a reply

Server time is: 2024-04-16 15:20:56
Your offset time is: 2024-04-16 15:20:56