Changing from one character to another (like the Diablo 2 Druid's "werebear" skill)

Hey! I’m trying to make a ‘skill’ like the Druid’s ‘Werewolf’ and ‘Werebear’ skills in Diablo 2. Here’s a summary of what I’ve already made:

Anim BP for top-down character (has main states, as well as punch/kick/roll, all working great)
Anim BP for Bear (already retargeted, all animations work correctly)
BP_TopDownCharacter
BP_Bear

Here’s a screenshot and video of the transformation setup.

Here’s a vid of the transformation. Debug text in upper left.

I got it working where the mannequin transforms into the bear, but in bear state, only the jump/walk/idle animations work. The punch/kick/roll animations don’t activate. Then, when I press ‘G’ key again, they transform back to mannequin, but now their kick and punch, etc. do not work. IF I transform from mannequin to bear and back again without pressing kick/punch, the mannequin’s actions will still work. However, if I press punch/kick in bear form, then switch back, the mannequin does nothing when I switch back to him. What am I missing here? Something in the controller BP? Is something not switching back to it’s full original state?

Thanks for any help!!!

Hey @SellSoul!

Can I ask what happens if you don’t change the default pawn in the gameinstance?
I’m worried that this has something to do with Enhanced Input. Can you show your input code?

1 Like

Yeah! Do these screenshots cover everything?


IA_Metamorphosis

I was using an EnhancedInputAction_IA_Metamorphosis to change between manny and bear, but the debug print strings showed that it was getting triggered like…1000 times per keystroke…so I just changed it to plain ol’ ‘G’ for now.

And one more crazy tidbit, if I set default pawn to BP_Bear from the start, and have him switch from manny to bear and back, the punch/kick animations all work fine, except that the mannequin starts using the Bear’s skeletal structure, with predictably silly results.

So here’s what I’m thinking:
An Enum of forms. So you’d make an enumerator with three forms(2 for now):

E_Forms

Human
Wolf
Bear

Then you’ll make sure to “SET E_Forms” when you switch skeletons and animBPs. Work in your Input actions again, this time using a SwitchOnEnum:E_Forms to determine what actions will be taken with the input. That’s really all I can think to do, this is SUPER weird, and I think it’s just buggy, to be honest. Enhanced input still has a few weird behaviors, and hopefully using the Enum can guarantee certain actions WILL be taken, I’m thinking it’s trying to use actions from the other skeleton. That, or it’s unlinking input actions from the player controller itself.

1 Like

Hey I just learned about enums today because I’m making new state machines! I’ll try this out and hopefully I can mark this bad boi solveddddd. Thank you so much for the input (literally)

1 Like

Dang I think either I’m not understanding how to use enum switches or something is just buggin’. Here’s what I interpreted your feedback as:

Is that…right

@SellSoul I think the correct way to do this is to have two different charecters and when you want to transform from human to bear to just spawn the bear one, possess it and delete an old one. It is not the best idea to just change skeletal mesh and animation asset, because you will come to much more problems in the long term, and it would be a total headache, when you would like to make some custom abilities for bear, you would basically have to store all the logic in one bluprint and somehow switch based on what your appearence is.

1 Like

Hey @SellSoul!

Yeah you have the Switch backwards! It will output based on the CURRENT E_forms. So you want the Human output to be bear (or eventually Wolf) and the Bear output to be Human. So basically, on button press:

Check Enum.
If E_Forms = Human: Bear Switch Code, Change E_Forms to Bear.
If E_Forms = Bear: Human Switch Code, Change E_Forms to Human.

image

1 Like

I don’t have unreal on hand now, but I think remember in certain cases that is not enough to change the animation blueprints. you need to add some nodes to initialize the animation blueprint also after you have set that Set animation instance class.

1 Like

What @dorusoftware says sounds correct, but I’m not 100% sure myself. I don’t understand why you’re changing the default Pawn though, @SellSoul. Should just be all one player BP with alternate meshes and AnimInstances. That might have something to do with the wonkiness of starting with bear vs starting with human.

1 Like

I know this is way more advanced that what you can do now but if you want to study a better method of switching between characters you can download the lyra project.

In that project the characters are not controlled directly, the male and female, but there is a hidden character which always remain in the game so you don’t need to change these animation blueprints. When in that game you see the character dying and vanishing with that cool effect you can do something similar, a nice transformation between the human and the bear. with visual effects and all.

So you have a hidden character that has all the move logic and others stuff like that and then on top you can have different looks, human, bear, female.

But is advanced stuff. I didn’t search youtube maybe someone did a tutorial video about it. Maybe you are lucky

1 Like

I love this community so much. Thank you all for your help. I’m going to try alllllll these methods and then send you all a free copy of “exact replica of Diablo 2” when it ships in Q3 2132. I’ll let you know how it goes!

■■■■ none of them are working, so something further down the node tree is wrong, because flip flop, sequence, branch, and switch on enum are not working in front of debug G key or inputAction bound to G. If I set default pawn to BP_Bear, kick and punch work, but if I set default to BP_TopDown character, only walk/jump/idle work. This is a pickle! I’m gonna download the Lyra files and see how they do it. So far all the tutorials I’ve found for switching characters during gameplay are: have two characters in the level, and switch between them. But my characters aren’t in the level until gameplay begins. Maybe it has something to do with my state machines…it seems like it’s only switching the skeletal mesh, and not properly switching to the Bear’s anim BP. INVESTIGATION IS FUN THO!

In case anyone googles this in 2025 and is still curious: the solution more or less came down to using “Possess” nodes instead of “Set Skeletal Mesh” and “Set Anim Instance”. Actually I wouldn’t recommend going the latter route because in order to properly initialize everything, it requires a lot more work, and sequencing off of beginGameplay and eventTick and yadda yadda. Here’s what I ended up with:

Inside BP_TopDownCharacter (manny default bp):

Inside BP_Bear (the bear that I wanted to shapeshift to):

The “Shapeshift to Bear” function inside manny’s bp:

The “Shapeshift to Manny” function inside bear’s bp:

And now, when I press G to transform…POOF I’m a punchin’ kickin’ bear, and all the print strings are firin’ and I feel happy. Hope this helps someone else too!

Note I’m still new to Unreal, so I realize that these blueprints are riddled with unnecessary elements, but it works for now, and please, if you have any suggestions for how to simplify, I’m all ears. This took me weeks of trial and error and endless google/youtube rabbit holes but nothing was quite what I was looking for.

Shoutout to Mind-Brain for the enum tip–without it, I’d be living in boolean hell, and now I’ve found a lot more uses for enums in other parts of the project!

1 Like