Character class abilities

hi.
i was able to setup a character class system(setting preset health,weapon,armor,etc) within a single player character/controller but i am having difficulty trying to figure out how to do a ability system(pressing button to do ability) and have it do different actions depending on which class was chosen(E.G. spy = turns invisible,tank = activates shield,etc)
Anyone have any ideas or input?

it really depends on your game, the way you want to set it up, and how many roles (classes) you have.

one thing you could do is to have a base character class then have each role be a child class. in this method you could have a custom event say ability1 in the parent class, then have the functionality only connected in the children. in this way you can then just call ability1 and no matter which of the children it is the event will be called, the difference will be what each ability 1 does. basically your calling a event that they all inherit and they respond differently.

another method you could use would be to have all the abilities in one character then switch which is run via a switch on enum.

theres a ton of ways it could be done but again like all things it depends on your game.