How can you make a class based game(like overwatch or tf2

I am pretty new to programming and am trying to make a class based game and i want to know how can you make the class system that some characters have more or less health, have more or less speed, have different abilities, have different weapons than other characters. and a guide on how to program would be good too.

Basically you have to make a parent class (with general attributes and functionalities from a character), all these things (like health, speed, abilities weapons and whatever) need to be variables, the “parent class” will work as a “abstract class” (a class that won’t be used at all, will serve only as a parent class), then you can create a different class for every character that inherits from the parent class, then you just change the attributes (like health, speed…) since they’re variable, it’s kinda hard when people ask me about “where can i learn about how to program?” i can’t give you a small text that you can read and learn it all, but about this subject (creating a game with a lot of different character with different attributes and powers) i suggest you learning/searching about inheriterance in Object Oriented Programming

in the “twin stick shooter tutorial” there’s a C++ base character (that works as a parent class) and there are 2 classes that inherits from it, one of them is the main character (that the player controls) he have a weapon can walk and shoot, the other one is the enemy, he looks different is controlled by AI and damages you when he gets too close, obiously making a complete game like the one you said would be much more complex but this is a small example of how doing it.

thank you, but how will i be able to choose between the classes

depends on what you want to do, you can make a menu (search about HUD), there you can create a button for every character and choose a image to this button (like a picture of the character), clicking in a button will fire a event, in this event you can store in a variable wich character was selected, once you know what character you want to spawn you can just use “Spawn actor from class” and “possess” to place the character in the level and control it.

thanks, but were did you get this information from, any website or thread. If you did get that information from somewhere can you send it to me, also sorry for taking so long I had to do something

Most of what i know about logic/scripting i’ve learned at College, the rest i’ve learned watching tutorials (like the one i suggested, you can find them in the unreal website) i dont have another source of knowledge to suggest.

ok thanks, i’m still in highschool