Hi. I was wondering how I’d go about selecting a character before going into a level? If I have a group of say 15 characters already set up where would I begin?
This is fairly easy. You can do one of two things:
Have the same Character BP and switch its mesh on Begin Play (based on a previous selection). Or have several characters loaded in the level and Possess one of them when you begin your level.
If each character has different animations / abilities, etc then go with the second solution.
You can create a character select Level where you have all your Meshes displaying (Or a list for the Player to choose). You can save this selection on the Game Instance BP and then call this BP to get the character reference when you load your level.
Check out this post about it - https://answers.unrealengine.com/questions/91531/how-to-use-the-gameinstance-bp-to-send-info-to-oth.html
Hope this helps!
@CoquiGames Thanks! Twice in a row you’re a lifesaver.
Glad I could help!
Hit a bit of a snag. I’m using a GetAllActors of class and using the base character I tried to promote it to a variable so I could get the class from the gameinstance and it wont let me. It only lets me if it isnt a variable. Something I’m overlooking?
I haven’t actually done this, so not sure about your setup. If saving the class doesn’t work, try saving another type of variable - say an Integer called CharacterID. Assign each character a unique ID and when you select your character save the CharacterID on your GameInstance.
On your loaded level, get the CharacterID and then do a Switch on Int. Then for each ID do a Spawn Character from Class using the correct character class
hi I am working on a multiplayer game and i have same issue
Can you suggest how I can load characters in map before opening it