How do I switch character blueprints
I'm prototyping a game where the character can transform into different forms when collecting different powerups.
Each character has different collision and skills and I want to switch the character blueprints rather than just the mesh. How do I approach this???
The first character is the main while the other two are the transformations. We see here that the main character's collision spheres stay the same even after transforming.
This is all in the main character blueprint
OnCollisionOverlap > Cast to Coin (Powerup) > Destroy Coin > Set NewAnim > Set New Mesh > Delay 5s > SetMainAnim > Set Main Mesh
Thanks in advance!
Okay so acouple of suggestions, you should perhaps try to use some inheritance to save copying alot of code over all the time.
Instead of each Character and Coin being their own thing you do:
What this means is all of your sub Characters will inherit from their parent BP, what happens then is MainHero can be defined in the main Morph and any other Morphs you decide to create will work based on existing functionality.
Similarly with Coins:
With your copy of my code you made a minor error:
The reason for this is because you need to store your old Hero in the current Morph to switch back to it when the timer is up. The reason you store it there is that the coin gets destroyed so the reference might end up becoming invalid. Since its in an active Actor you dont have to worry about that happening.
Keep up the good work, youre doing really well so far :)
You'll need to Possess each new Character so that your Controller gives you input to them.You'll need to spawn a new Character, Possess it then Destroy the old one.
answered Feb 05 '17 at 05:14 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here