» Sat Jan 12, 2013 4:54 am
I was thinking of a way of doing this that would allow a bit easier coding. But would also mean the characters outfits/armor or whatever they are would have to be as a full set. If you don't need them to be able to switch individual pieces like head, feet, hands, etc... you could do this:
Create multiple looks for your character, in my case I want the character in various suits of armor. Each suite get's it's own sprite sheet, or own row on the sprite sheet. I could then create a variable that represents which row or sprite sheet I want. If I name them all something similar like mainCharacter_GreenArmor then in my variable I use it to control the last part, so if I need them in the Blue Armor, I set the variable to _BlueArmor. Then I have it update the current animation or sprite sheet being used by adding _BlueArmor to it like mainCharacter_BlueArmor. THis way I can swap out easily in game simply by using my variable appended to the character name. Not sure how I would do this in Construct, but outside of construct in code it wouldn't be too hard.
For Example, if I have spritesheets used for the following:
mainCharacter_BlueArmor
mainCharacter_GreenArmor
mainCharacter_BlackArmor
mainCharacter_DefaultArmor
When I find those items in the game and want to switch my mainCharacter to wear them, I just update the sprite with the appropriate spritesheet name so if I am currently using mainCharacter_DefaultArmor, I then set it to mainCharacter_GreenArmor. And use that to set whatever property of the sprite is used to control what spriteset is being used.
Again, no idea how hard it would be to implement in C2, but in .Net it would be fairly straightforward. No idea if this is helpful or not, but figured I would share my point of view.BluePhaze2013-01-12 04:55:51