Make game with multiple characters

Hi.
I need some help with how can I create a game with multiple characters with multiple characters having multiple attributes. like size, anims, speed, states etc.

I’m using UE5.1 and i’ve always worked with one CharacterBP. I’ve never worked with multiple character blueprints. One friend mentioned I should create a parent CharacterBP and then make multiple characterBPs. Then inherit them from the parent class.

Truth be told, I have no idea on how to do that.
I need some help, please.

Are you asking how to inherit a class? Is this the rephrased version of the question?
If so then simply right-click the class and create a child blueprint class.

image

1 Like

Thank you,
but in a sense, yes.
now, i tried inheriting from the ThirdPersonBP class. but the movement still won’t work…

I have created a CHARACTER SELECTION SCREEN. and that works well. when i select my character, the main map opens too. and it spawns the selected character as well. but the only issue is, I cant move the character.

any idea on why it’s happneing?

Tons of things may lead to the issue. Here are a couple of checklists you might want to check.

  1. Does your character gets possessed while spawned?
  2. Does your input function executes?
  3. Did you override any important functions inside the child class?
  4. Does your skeletal mesh uses the same skeleton respective to the same animation blueprint?
  5. Does your movement components get destroyed for some reason?
  6. Above all does your parent class works by default?
  7. Are you using the inherited class as an AI class or a player class?
1 Like
  1. didn’t place an actor in the world but assigned a vector location for the actor to spawn.
  2. it does execute with the parent actor. and when playing with the parent actor as default.
  3. I’ve never created a child but still when i did, didn’t work.
  4. yes.
  5. How do I check that?
  6. Yes, parent class works perfectly
  7. Using the inherited class as player (character) class

Does it mean your child class does not execute the inputs?

yes, that’s right

you can only one character but on construction script or begin play change these attributes. on the other hand you can create child classes, parent will contain common attributes and child will have to override these

I understand. and already tried doing that. parent child inheritance. but didn’t work for me as then the movement wont work :confused:

kindly check if your pawn is possesses, also try printing input values, also do let me know where your input actions are called?
lastly if nothing works, you can get out of parent child relations and maintain all characters independently, and use interfaces, if you need assistance in that I can provide you simple project with this functionality

I have no idea what you have done. But by default, there shouldn’t be any problem at all. Simply right-click and create a child class, that’s all. I think your input might have some problems. For my demonstration, I’m using enhanced input, maybe you could give it a try.

1 Like

Thank you for this example… i could make it work. but one question. i had to put the character into the world and and then call a reference in level blueprint to make it work. i was just wondering what would i do if i had a character selection screen and the character would start from a point

A couple of things need to be understood first before doing anything. Does the character you are referring worth to be instantiated as a child class? Are you making a cosmetic/skin selection with the same functionalities or should each character have different functionalities?

If it’s just skin/cosmetic just change the skeletal mesh only. You don’t have to worry about inheriting the class. If not, then it’s a different story.

Let’s say there are 3 different characters. A, B, C.
they have 4 different skins each and A,B,C all have different attributes like different size, speed and model

I would just use the same blueprint for each character and set its animation bp, stats, skel mesh, etc when it spawns. If you are not sure why you would want to use a child blueprint than there is probably not a reason to use one.