Collision woes

Blitz3D Forums/Blitz3D Programming/Collision woes

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Okay, I've just started to use blitz collisions and I know I'm not using them correctly!

I'm cycling through entities using countcollisions and seeing if anything's hit it. Obviously this can't be the correct way of doing it, so how does one get blitz to report what's been hit and by what?

For example,
for n=0 to max_shots
blah
blah
blah
c=CountCollisions(shot(n))
If c>0
     for nn=0 to max_objects
     c=CountCollisions(Object_mesh(nn))
     if c>0 And object_health(nn)>0
           "object nn has been hit by shot n"
            endif
     next
     endif
next

This works fine, however, it just seems to be a painfully bad way of doing it!

Suggestions would be appreciated!