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.
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.
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
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.
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.