I am trying to make characters in a game but I am having trouble, because I can't make characters as a class. I want to be able to make characters as a class so that I can make object based stats.
I was thinking about something like the code bellow, but my problem is I don't know how to call the constructor. I don't know how to interact with the classes correctly and how to get or set the variables. I have only started using this software a few days ago.
class Character{
constructor(Wisdom,Strength, Constitution, Charisma, Dexterity, Intelligence){
this.Wisdom = Wisdom;
this.Strength = Strength;
this.Constitution = Constitution;
this.Charisma = Charisma;
this.Dexterity = Dexterity;
this.Intelligence = Intelligence;
}}
Character mainCharacter = new Character($Wisdom, $Strength, $Constitution, $Charisma, $Dexterity, $Intelligence);