Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

From the other character sheet? You mean farmer base sprites?

The additional ones from the sword and shield pack for the character base

They are seperate sheets. And when I'm trying to play a slash attack animation, I instead do the "push" animation.

I would have to change between the p1,p2,p3 folders through the script, am I right?

Sorry I was at a memorial celebration for my father the last few weeks. But you are correct you would have to change the paperdoll directory during runtime.

Oh, I'm sorry for you

Thank you, I appreciate that. Let me know if you have any other issues!

How can I change the paperdoll directory during runtime? Would I change it in the player paperdoll script instance when an attack is registered for example?

So this really depends on how you are managing your spritesheets. I personally find it easiest to merge  p1, p2, p3, p4, etc. into a single spritesheet. If you don't follow that method then you really need to follow 2 steps.

1) You need to call the SetTexture method of every PaperDoll script on the character to change to the appropriate directory where your combat sprites are located. 

2) Then you would need to call a SetTexture on your tool A / tool B folders to change to the appropriate tool, directory, etc. before finally enabling your tool layer(s) until the end of the animation before disabling them again. 

However, if you merge the different animations into a single spritesheet you can forgo step 1 and move on with step 2. How you use the paperdoll is really up to you, it isn't meant to be a end all be all solution, and will in the end still require some problem solving on your part to incorporate it into your own project the way you need it.  Using the weapons/tools requires quite a bit of finesse and micromanagement that extends beyond PaperDoll.

P.S. - It should be worth pointing out that due to the unique usage of the tool spritesheets, these layers will likely not be part of the paperdoll as children, and instead will simply be a GameObject containing a SpriteRenderer and Animator component attached to the character that you then hide/unhide the tool and call the needed animation as appropriate.