 |
duval Level: Protégé
 Registered: 06-10-2006 Posts: 5
|
Re: collision detection help
Thank you very much this is a good piece of code to learn from, like always you guys are awesome, I have found that with this code it still leaves to the right but by adding - square.Width it stops from leaving
dim sq_new_x as long
sq_new_x = x
if sq_new_x > me.scalewidth - square.width then sq_new_x = me.scalewidth - square.width
if sq_new_x < 0 then sq_new_x = 0
me.square.left = sq_new_x
____________________________
Chaos = Multiverse = Us.
|
|
08-10-2006 at 09:48 PM |
|
|
|
|
 |
 |