forums

TNT Basic Forums > Programming Q&A
Sprite Collisions
< Last Thread     Next Thread >
Author
Thread        Post A Reply

05-05-2003 23:42

Posted by:
Stephen Lund

Location:
Michigan USA

Click Here to Email Stephen Lund   Find more posts by Stephen Lund

Hi, I'm new to the forums and I'd like to ask a question. How do you detect sprite collisions?

05-06-2003 01:08

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

look up the sprite col command in the tnt basic help. it's pretty simple.

05-09-2003 21:28

Posted by:
Stephen Lund

Location:
Michigan USA

Click Here to Email Stephen Lund   Find more posts by Stephen Lund

I went to the TNT Basic Help and they told me to do
sprite=sprite col(testsprite,forsprite)
is that all i need to do
and then what it does after

05-09-2003 21:50

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

'example:

int x

sprite 1,100,100,0
sprite 2,100,100,0

x=sprite col(1,2)
if x=2 then print "Sprite 1 collides with sprite 2"
if x=-1 then print "Sprite does not 1 collide with sprite 2"
' there the first option will be choosen

sprite 1,100,100,0
sprite 2,300,300,0

x=sprite col(1,2)
if x=2 then print "Sprite 1 collides with sprite 2"
if x=-1 then print "Sprite does not 1 collide with sprite 2"
' there the second option will be choosen

05-10-2003 13:52

Posted by:
Stephen Lund

Location:
Michigan USA

Click Here to Email Stephen Lund   Find more posts by Stephen Lund

Then do i have to make the 1st sprite move

05-10-2003 14:10

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Well, YOU decide what's in your game!?!? If you want it to move make it move and if you don't want it to move do not make it move. Why are you asking me?

05-10-2003 16:30

Posted by:
Stephen Lund

Location:
Michigan USA

Click Here to Email Stephen Lund   Find more posts by Stephen Lund

THANKS

Thanks
for all the help you gave me.

In the example you gave me, how many sprites do i have to make?

Thanks again
Stephen

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.