My goal is to have a player click on a map, at which point there's an animation of the sprite moving from the starting location to the clicked on location.
I'd like to be able to set the coordinates for the sprite as simply as possible (e.g. the sprite moves from point (100, 100) to point (300, 300) on the map at a rate of, say, 100 pixels per 0.3 seconds. Or whatever.
I've tried to do this via creating an animation that I can lay over a background something like this:
Code: Select all
image hero_map1:
'images/hero.jpg' pos (100, 100)
pause 0.3
'images/hero.jpg' pos (200, 200)
pause 0.3
'images/hero.jpg' pos (300, 300)
Code: Select all
image hero_map1:
'images/hero.jpg'
pause 0.3
'images/hero.jpg'
pause 0.3
'images/hero.jpg'
I feel like I'm missing something obvious, but I can't figure out what it is. Can anyone point it out to me? Pretty please? ^_^