Change blueprint character in gamr

Hi all…
I ve created 10 blueprint player. Now how I change in game this player? For example I m playing with character A. When I press 1,it should change my player to B. How I can do it?

Hey there, you can do that by:

  1. Spawning the new character blueprint (using SpawnActor) with the same location and rotation as your current
  2. Possess the new character blueprint
  3. Destroy the old character.

Yes, use get player controller Possess function.

Sure, let me know how it went :slight_smile:

For possess you mean get player controller?

Thanks a lot. I will try tomorrow

Here is a reference:

I used a destroy actor l, a spawn and a possess. But now it spawn but I can t possess it, and my pg is still there after the destroy actor

My bad. It works. Thanks
Only a things. Why it spawn next to the character and not on the character and not in same direction?

I would say that the new character might be colliding with the old when it spawns, maybe instead of destroying the actor you could set its actor collision and visibility to off then spawn the new character and posses and only at the end do you destroy the old character.

Good to know, please mark my answer as correct and upvote it if you’ve found it helpful :slight_smile:

It works now. Thanks a lot