SpriteGrabber Animation Resets

Good day,
I have used SpriteGrabber to make a spritesheet of a walk cycle. It’s 12 frames long.

The character walks when a button is touched.
And stops when you stop touching it.

However.
If you touch the button and move your finger around inside it the animation restarts from the 1st frame again.

function dpadright:touch()  
 AllRobot:playClip ("WalkR");  
end  

I need to allow the user to move his finger on the button but keep the animation playing without restarting.

Is there a way to easily ignore the moved phase but still keep it registered your pressing it?
Or a SpriteGrabber command that’ll keep it looping?


And to save creating a new thread,
How would i go about using multiple spritesheets on the same object?

(I have an Idle, Walk left, Walk Right, but if i have them all in 1 sprite sheet it exceeds 1024 x 1024.)
So i have Idle in 1 spritesheet & Walks in another.

Do i have to delete the object and spawn him again using the other spritesheet?
Or is there a spritegrabber command to use sprites from other spritesheets?
grabsprite?

Double Thanks!!! [import]uid: 91798 topic_id: 15736 reply_id: 315736[/import]

Hey there, are you using “touch”?

If so, rather than doing what you currently are you should do [lua]if event.phase == “began” then
– Play sprite here
elseif event.phase == “ended” then
– Set idle here
end[/lua]

Can you give that a go, please? :slight_smile:

Alternatively I have a tutorial on

Hi again,
To update you:

The touch event part has solved that issue, it now continues animating regardless of whether you moved your finger around.
=)

The multiple sprite part is not going so well.

There’s quite alot of issues from delayed animation, simulator crashes and jumping around of the character.

I was using spriteGrabber and had to ditch it to use this sprite tool, Is there a spriteGrabber equilivant?

Sorry! i didn’t want to write down all my problems if there’s an alternative see? [import]uid: 91798 topic_id: 15736 reply_id: 58203[/import]

Hey there,

I’m not sure because SpriteGrabber is a third party tool, so you may want to ask them directly.

Peach

PS - Simulator shouldn’t crash from using it; a minor delay when changing animations should help with any common display issues. [import]uid: 52491 topic_id: 15736 reply_id: 58338[/import]