forums

TNT Basic Forums > Programming Q&A
Collision?
< Last Thread     Next Thread >
Author
Thread        Post A Reply

10-14-2002 02:06

Posted by:
GreySnake59

Click Here to Email GreySnake59   Find more posts by GreySnake59

Is there any kind of built-in collision in TNT Basic?

I am making a demo RPG in tnt basic and I want to know when the character hits an object so I can move it back to it previous location and the draw frame.

10-14-2002 07:54

Posted by:
John Treece-Birch

Find more posts by John Treece-Birch

Sprite Collision

There are some built-in functions for testing collision between sprites. The functions Sprite Col and Sprite Col Rect handle this. You can look them up in the Collisions section of TNT Basic help.

Thanks,
John

10-14-2002 11:41

Posted by:
GreySnake59

Click Here to Email GreySnake59   Find more posts by GreySnake59

:)

Thanks for your help!

10-14-2002 11:58

Posted by:
GreySnake59

Click Here to Email GreySnake59   Find more posts by GreySnake59

Hmmmm....

I used this code to check if the man collided with the building:

sprite = Sprite Col (0,forSprite)

When I run it gives me a syntax error, 'Indentifier "forsprite" has not been declared.'

help anyone?

10-14-2002 12:58

Posted by:
John Treece-Birch

Click Here to Email John Treece-Birch   Find more posts by John Treece-Birch

Sprite Col

That error means that TNT Basic doesn't know what 'forSprite' is. Have you declared 'forSprite' as a variable?

John

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.