collinhover/impactplusplus

Player Multi Entity

Closed this issue · 3 comments

anyone have any idea how to create this entity

player combine

mh00000
mb00000
armor

Can you be more specific? What is your goal? You can make an animation sheet that will combine all states seen at your post and swap the animations as needed with only one entity. Or you could use multiple entities (head, body, machine) and try to "synchronize them". It's hard to give you an advice without more information about what you are trying to do.

is like a rpg .. you equip a hat and head change..
but I want to know if there is any way to do this without creating multiple entities
something like this
http://impactjs.com/forums/code/layered-animation-sheet

At the moment ++ does not support multi part entities. You can certainly do it without creating multiple entities. Without testing it myself, I'd guess you'd need to modify the update animation and draw methods of an entity to call themselves once for each part and swap out the animation sheet, anims, size, and offset.