Sprite question

Hi,

Just a quick question on using sprites...

I have a requirement where I have a man walking along the screen (manSprite) and if he collides with something it shows him being hurt(hurtSprite)..

I have achieved what I want by using two sprite instances..
one for the 'manSprite' and one for the 'hurtsprite'.. basically I listen for a collision and hide one sprite and show the other..

my question is.. is it possible to use the same sprite instance, without using two? ie when a collision happens... still use the walking instance and change the image?

I hope that makes sense

Thanks

How are you animating the walk and the "man" getting hurt?

More importantly what are you using to make the sprites?

Hi,

I am using a sprite sheet.... and using the sprite.newSpriteSheet..

so i have two separate sprite sheets and two sprite instances...

First of all you didn't answer any of my questions...

Did you use flash to animate your walk and getting hurt?

Or did you use Photo Shop to create a sprite sheet with all the frames needed?

If you used flash I would suggest that you use sprite loq! Its the best tool for multiple sprites created in flash

Sprite loq allows you to label all of your sprite instance inside flash by adding another layer and labeling it according to the animation. Then you simply create some splits for those instances so corona knows whats what.. Import the splits you have created to sprite loq.

Then in your file you can do something like this to combine them

1
local ffactory = loqsprite.newFactory("fireLoop", "armyMan")
views:1442 update:2011/10/22 9:46:13
corona forums © 2003-2011