
-----------------------------------
upthescale
Wed Apr 26, 2006 4:14 pm

WhatDotColor
-----------------------------------
ok i dont no how to use whatdotcolor and i am using it now i am learning...i haevn't ofund any good tutorials, so i need a little help.....i made a helicopter, and a square is coming at it......the vars for the copter are x,y.....


if whatdotcolor(242,y) = 54 then
collision 


that works, that is when it hits me comign at me....
but what i would like to do is when the helicopter is falling, and it hits teh top of the block, i want that to be a detection too. how would i do that?

-----------------------------------
Delos
Wed Apr 26, 2006 4:31 pm


-----------------------------------
Well, you'll have to define a radius around the block within which wtc will check for collisions.  This is a little much, seeing as for every iteration of your loop, you'll have to check every one of those coordinates around the box to see if any collisions have taken place.
A far better startegy when it comes to collision detection is to use Math.Distance() and determine the distance between the two objects.  This may be a little more difficult that using wtc, but in the long run will serve you better.
wtc does have its strong points, mind you, just don't rely on it too much.

-----------------------------------
Clayton
Wed Apr 26, 2006 4:38 pm


-----------------------------------
also if your looking for tutorials on whatdotcolour read andys excellent tutorial on it (he is a whatdotcolour warrior for a reason)
