I have image "bird" and others image "branch1","branch2",... . When the bird jump, it stops falling when it touches the floor or a branch, How can i test if he touches a branch, i try to rename branch1,branch2, ... to branch but it's don't work
Code: Select all
command JumpDown
if ( ( the bottom of image "bird" <> the top of image "floor" )) then -- or (the bottom of image imageHéros <> the top of image "branch" ) ) then
set the location of image "bird" to (item 1 of the location of image imageHéros, item 2 of the location of image imageHéros + 30)
send "JumpDown" to me in 75 milliseconds
end if
end JumpDown