Change Character Class in game?

So I’ve made two blueprint classes under the character category. The first class is a regular character that is sort of a freeroam type that explores through the world. The second is a character with a rifle and they each have their different inputs and animation blueprints that i have set up. Is there a way to completely switch to a different character class in game thru like an action event. I’ve been researching and nothing has come up. This is literally the last thing I need to do for my project.
Thanks a bunch in advance!

Have you tried spawning the second class into the world at the location of the first class, possessing the second class, unpossessing the first one (from the controller) and then destroying the first class?

Sorry for the bother but are you able to send a screenshot of example blueprints? Thanks anyway for the quick response!

Turns out you don’t need to worry about unpossessing, just delete and “possess” the new pawn. You do need a reference to the “new” pawn which you can create when you spawn the actor into the world, save the output as a reference to use for the input to the “possession” node.

Would this be in the level blueprints?

I did it in the level BP just because I was lazy and it was easy to make a reference to character 2 from there. You can do it anywhere you want though as long as you create a reference to the other character somehow. So probably in the controller would be ideal so the switching ability stays with you through all levels without having to repeat code.

Since I only have one level, would this method be fine?

I’m trying to implement the function right now and sorry to bother again but do you mind telling me how i spawn the actor into the world?

Haha yea. It would be fine then

Here you go.

You are a life saver thanks a bunch!

were do you get the location from?

What do you mean? It’s right there in the screen shot…“get actor location” becomes “location”. Location the variable is just a variable I created to store a vector of that’s what you mean.

i see thanks it all works fine im just trying how to fined out how to make it when i select the character he stays like that you know what i mean so… when i pick him he stay and does switch to my default character thanks for fast replay by the way :slight_smile:

my is a character selection screen so when i click on it i want it to save to my game and then when he plays level his that character

probs should of replayed here my bad sorry but any way
you know how to do this?