One cheat that we use is to simply edit the lua file. If your spritesheet is finalized, simply copy and paste frame entries from the lua file at the bottom into the sequence you want to have happen. So for example using the code above you could do something like this…
local SpriteSheet = {}
SpriteSheet.getSpriteSheetData = function ()
return {
frames = {
{
name = "Anim\_One\_1.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 0, y = 0, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
{
name = "Anim\_One\_2.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 12, y = 0, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
{
name = "Anim\_One\_3.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 24, y = 0, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
{
name = "Anim\_Two\_1.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 0, y = 0, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
{
name = "Anim\_Two\_2.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 0, y = 12, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
{
name = "Anim\_Two\_3.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 12, y = 12, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
{
name = "Anim\_Two\_3.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 12, y = 12, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
{
name = "Anim\_Two\_2.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 0, y = 12, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
{
name = "Anim\_Two\_1.png",
spriteColorRect = { x = 0, y = 0, width = 10, height = 10 },
textureRect = { x = 0, y = 0, width = 10, height = 10 },
spriteSourceSize = { width = 10, height = 10},
spriteTrimmed = false,
textureRotated = false
},
}
}
end
return SpriteSheet
Like I said you’ll to make sure that the spritesheet is finalized because each time you make a tweak in zwoptex or whatever spritesheet progam you use, it will wipe out all your custom frame orders and you’ll have to put them in again by hand. [import]uid: 9840 topic_id: 20357 reply_id: 79748[/import]