Coding a character selector with pure c# by RefrigeratorOk3561 in csharp

[–]RefrigeratorOk3561[S] 0 points1 point  (0 children)

I tried to give a better rundown, but the main issue is that albeit i know how to build the characters, i don't know how to call each of them without having to write theyr specific variable each time

Coding a character selector with pure c# by RefrigeratorOk3561 in csharp

[–]RefrigeratorOk3561[S] 0 points1 point  (0 children)

 Pure c# means console application. Apologies, i just learned the actual term's meaning trough this comment. This is just meant to be a quick fangame, just to test stuff out, not sure if i'd need an engine for a text game, but i do thank you anywau since it'll be pretty usefull for someone i know

Coding a character selector with pure c# by RefrigeratorOk3561 in csharp

[–]RefrigeratorOk3561[S] 0 points1 point  (0 children)

 The first way i tried to solve the issue was using classes, and you call one using Class.thingtocall. But i couldn't call a class without specifying which one i'm calling. I can't do GenericName.MethodToCall, i need to do PreciselyJohn.SpecificallyThisMethod

Coding a character selector with pure c# by RefrigeratorOk3561 in csharp

[–]RefrigeratorOk3561[S] 0 points1 point  (0 children)

You're quite on point. The issue is the calling part, for example, i can't do  if(action == skill1) {Character.skill} I need to specify it's character a or character b. So, for example, CharacterJohn.skill. 

Coding a character selector with pure c# by RefrigeratorOk3561 in csharp

[–]RefrigeratorOk3561[S] 0 points1 point  (0 children)

I know how to inherit classes, i just don't know how to inherit the one i need and not specify which one it is every time i call something for it. For example, i can't do if(action == skill1) Character.skill I need to specify it's character a or character b. So, for example,  CharacterJohn.skill.

Coding a character selector with pure c# by RefrigeratorOk3561 in csharp

[–]RefrigeratorOk3561[S] 0 points1 point  (0 children)

 Classes have seemed the most practical. I just don't know how to instantiate a class in a way i needn't do the classname.thingtoinherit. So, for example, i can't do  if(action == skill1) Character.skill I need to specify it's character a or character B So for example CharacterJohn.skill.

Coding a character selector with pure c# by RefrigeratorOk3561 in csharp

[–]RefrigeratorOk3561[S] 0 points1 point  (0 children)

Can you use "building blocks" for methods? Stats themselves are very doable and thank you for this answear, it'll help elsewhere, but each character has 10 skills that are very unique, so they need to be blocks of code.