Strutcture of my player character

Hi Everyone!

I’m trying to understand how to make my blueprints nice:

I’m making a game with multiple players. They all have the same basic variables(health, speed, etc).
I would like one of them to have kind of the same attributes with different values, and also some extra attributes / function. He would be the Superplayer.
I want any player to be able to become a superplayer during the game.

I’m wondering how to do that nicely so my blueprint stays clean and easily updatable.
If I make a player class and a Superplayer class that both heritate from a character then I can easily change from one to the other right? Would that be the best way to go?

Have you through about using a Structure to store Data?


You can do it this way, yes. You would just give the Superplayer Class BP all your desired values.

But you need to think about how the player can become a Superplayer. Because using another class needs
you to Unposses the old one and destroy it, spawn the Superplayer Class BP and posses it.

If the player is respawnen, then you can go for this solution. But if this is happening midgame, then i would say
you create a Struct of all the values you want to change and you make a variable of that struct for basic values and
one for the Superplayer values. You can fill them in als default values. Now you need a 3rd variable of that struct.
This really represents the values of the character. If you now make a Superplayer, you will just have to set the
3rd Variable to the Superplayer one or otherway round, you set the third variable to the normal value struct.

Hope that helps (:

Hey thanks guys! I don’t know about structures (yet) i’ll dig into that asap.

As you say the player turning into a superplayer is not meant to be respawned (for example he keeps his health and many other things) so I shouldn’t destroy him and should go for your structure solution.
I’m wondering how to approach the visual side of this: I know I want the character to be very different: a different mesh, he’s taller, etc…
Should I have both mesh ready in my character but one of them hidden, then swap between them when the player is turning into superplayer? Would that be the right thing to do?

Thanks in advance!