TNT Basic Forums > Programming Q&A
Detecting if a sprite has been clicked?
< Last Thread     Next Thread >
Thread        Post A Reply

04-05-2005 13:25

Posted by:


Click Here to Email mark_667   Find more posts by mark_667

I've been away from TNT for a while and thought I'd pick up one of my old projects in the Easter break. I have still been programming, just in JAVA, not TNT. I need to know if there is a simple way of detecting if a sprite has been clicked on and returning properties such as the sprite ID, x and y co-ords if it has.


04-10-2005 22:49

Posted by:
Mark Tully

TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

If it's a specific sprite you want to test against the mouse cursor, you could use the 'Sprite Col Rect' command. If you want to detect any sprite under the cursor, one suggestion I've seen on this forum (I can't find the full thread at the moment) was to place a 1x1 sprite at the mouse position and then to a 'Sprite Col' with that sprite to see what's hitting the mouse position.

Hope this helps,


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.