I am having trouble writing a 'simple' routine to check for a collision between several objects
I have the co-ordinates stored in a multi-dimension array called partlist.
The X co-ordinate is stored in partlist(1,23) and the Y co-ordinate is stored in partlist(2,23) for example.
The following function works perfectly, but it is only checking between Array contents 2 & 3
I need it to check the collision between all the available contents of the array that I keep track of with a variable called 'Counter'
So I could use a Loop :-
For z=1 to Counter
checkcollision........etc etc
next
But I am struggling to work out the syntax to return a true or false value when exitting the function
I know a lot of you will tell me to use Types, but I have tried and failed!
So I am using an Array which is something that I know!
Speed is not an issue with the program
Any ideas?
Thanks
Andy
I have the co-ordinates stored in a multi-dimension array called partlist.
The X co-ordinate is stored in partlist(1,23) and the Y co-ordinate is stored in partlist(2,23) for example.
The following function works perfectly, but it is only checking between Array contents 2 & 3
I need it to check the collision between all the available contents of the array that I keep track of with a variable called 'Counter'
So I could use a Loop :-
For z=1 to Counter
checkcollision........etc etc
next
But I am struggling to work out the syntax to return a true or false value when exitting the function
I know a lot of you will tell me to use Types, but I have tried and failed!
So I am using an Array which is something that I know!
Speed is not an issue with the program
Function partcollision() If ImagesCollide(part,partlist(1,2),partlist(2,2),0,part,partlist(1,3),partlist(2,3),0) Then Return True Else Return False End If End Function
Any ideas?
Thanks
Andy