forums

TNT Basic Forums > Programming Q&A
Oh, the frustration...
< Last Thread     Next Thread >
Author
Thread        Post A Reply

11-13-2003 19:58

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

Hello again. A while back I was trying to create a sprite the contained generated text, so I could have damage numbers flying about all over the place and moving status bars. Someone said to use "text sprites" using the copy image command and a different canvas. Great I though, although of course as with any thing I try to do, it's just not that simple. Please paste this code into a new hieroglyph file. Now put a generic image of any size into bank 0. Now run it. Is there any reason you can think of why it doesn't work? Should it work? Does it work for you? If I have done something stupid, please correct me and tell me how it's supposed to work. Please. I have worked this one over for hours and it's doing my head in!!!

Oh, and have a nice day.

//Begin segment:

graphics mode hardware 800,600
load images 0
set default image bank 0

open canvas 3,288,64
canvas 3
paste image 0,0,0,0
draw text 55,55,"Hello"
copy image 0,0,0,0,black,false to 1
canvas 0
sprite 0,300,400,1
repeat
set random seed timer+random(0,10)
sprite 0,300+random(-100,100),400+random(-100,100),1
draw frame
forever

//end.

Thankyou. I REALLY need this.

Still alive, -wyvern.

11-13-2003 20:08

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

I'm not sure but...

copy image 0,0,0,0,... is wrong I guess... yo have to specify the x1,x2,y1,y2!!!!

11-13-2003 20:54

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

No, that's not it...

That doesn't work either. If you correct it on your machine, does it work?

11-13-2003 20:55

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

Oh.

11-13-2003 20:58

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

Well, there goes my last chances of being taken as a serious programmer... (sigh) This will probably happen many, many times. Thanks for your patience, and for waiting until I am out of hearing range before laughing your ass off :-D

11-14-2003 11:14

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

At least I appreciate that you avoided copying 500 lines of meaningless code and asking "Why does'nt it work?, it gives me 200 errors, there must be a bug in TNT"

If it's about 10 lines, I can look at it ;-)

while coding is really fun, reading others code is a thing I hate :-(. I'm lucky I'm not a professional programmer ;-)

11-14-2003 22:13

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

I'll bear that in mind. Thanks.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.