Hi guys,
I recently took onboard AppGameKit Basic and am enjoying it a lot. Using Spriter Pro, I made a man who has an idle standing animation, and can run in all 4 directions. At first I was working with the skeleton import, but then I went to using sprite sheets because I couldn't figure out how to make collisions between skeletons and normal sprites.
My issue is that when i go to animate the sprite using the sprite sheet, the values for the width and height do not seem to appropriate register on the image.
I've added the code below. This is assuming I have already loaded the images and given them an ID, as well as labelled them as global.
function AnimateStanding ()
SetSpriteImage ( dave, davestanding )
SetSpriteAnimation ( dave, 289, 608, 16 )
PlaySprite ( dave, 16, 1, 1, 16 )
endfunction
function AnimateRunRight ()
SetSpriteImage ( dave, daverunright )
SetSpriteAnimation ( dave, 399, 586, 16 )
PlaySprite ( dave, 16, 1, 1, 16 )
endfunction
function AnimateRunLeft ()
SetSpriteImage ( dave, daverunleft )
SetSpriteAnimation ( dave, 399, 586, 16 )
PlaySprite ( dave, 16, 1, 1, 16 )
endfunction
function AnimateRunUp ()
SetSpriteImage ( dave, daverunup )
SetSpriteAnimation ( dave, 240, 599, 16 )
PlaySprite ( dave, 16, 1, 1, 16 )
endfunction
function AnimateRunDown ()
SetSpriteImage ( dave, daverundown )
SetSpriteAnimation ( dave, 265, 599, 16 )
PlaySprite ( dave, 16, 1, 1, 16 )
endfunction
The product is shown below. I am definitely sure the size of the davestanding image is 289x608. Definite. But it still produces this:
Two options for help involve:
1. Finding a way to make the skeleton from spriter being able to interact well with other sprites.
2. Animating it properly.
Thanks a lot