So, I have a "silly little animation"
(images thanks to the good folks at https://craftpix.net/
Download link removed as improved version available further down.
with 2 buttons called "WL" and "WR" respectively to animate my 'boy' across the screen
with this sort of code:
Code: Select all
on mouseUp
put item 1 of the loc of grc "ramka" into LR
put item 2 of the loc of grc "ramka" into UD
repeat until LR < (- 50)
put 1 into WALKL
repeat until WALKL > 6
set the width of grc "ramka" to the width of img ("L" & WALKL & ".png")
set the height of grc "ramka" to the height of img ("L" & WALKL & ".png")
set the backGroundPattern of grc "ramka" to the ID of img ("L" & WALKL & ".png")
add 1 to WALKL
subtract 10 from LR
move grc "ramka" to LR, UD
wait 20 ticks
end repeat
subtract 10 from LR
move grc "ramka" to LR, UD
end repeat
end mouseUp