position reaction problem

BlitzPlus Forums/BlitzPlus Beginners Area/position reaction problem

Ice T.(Posted 2007) [#1]
My whole problem is that when two image's y axis positions align (one image on top on image on bottom) I want the top image to fall on the other image.
as much as I have tried I can not get it to work. :(

can anyone help?

Thanks


b32(Posted 2007) [#2]
I think the code should be something like this:
;if images are on above each other
if image01_x = image02_x then
  ;and image 01 is above image 2
  if image01_y < image02_y - image01_height then
    ;move image 01 down
    image01_y = image01_y + 1
  end if
end if 



Ice T.(Posted 2007) [#3]
image01_height ?


Ice T.(Posted 2007) [#4]
never mind I get it.

thanks! it works perfectly :)