![Smile :)](./images/smilies/icon_smile.gif)
Please help me with movement problem
![Smile :)](./images/smilies/icon_smile.gif)
I hope you can help me
![Smile :)](./images/smilies/icon_smile.gif)
Thanks:)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on mouseUp
move button"player" to mouseloc()
if intersect(button"player", graphic"barrier") is false then
end mouseUp
Code: Select all
global moveMe
on mouseUp
put true into moveMe
if intersect(button"player", graphic"barrier") is false then
move button"player" to mouseloc()
end if
aniLoop
end mouseUp
on mouseDoubleUp
put false into moveMe
end mouseDoubleUp
on aniLoop
if moveMe = true then
put the loc of btn "player" into tLoc
if intersect (btn "player", grc "barrier", "opaque pixels") then
stop moving btn "player"
set the right of btn "player" to the left of grc "barrier" --this line stinks because it does not cover all the sides
end if
wait 1 millisec
send aniLoop to me in 50 millisec
end if
end aniLoop
Code: Select all
on gameloop
if the hilited of btn "run" is true then
if intersect(btn"player",grc"barrier","pixels") then
stop moving btn "player"
end if
end if
if the hilited of btn "run" is true then
send gameloop to me in 2 ticks
end if
end gameloop
on mouseup
put the mouseloc into tMove
move btn "player" to tMove without waiting
end mouseup
Code: Select all
on mouseUp
if the hilited of me is true then
gameloop
end if
end mouseUp
Code: Select all
on mouseup
collision
move btn 1 to the clickLoc in 2 seconds
end mouseup
on collision
if intersect( btn 1,grc 1) then
stop moving btn 1
exit to top
end if
send "collision" to this cd in 1
end collision