Announcement

Collapse
No announcement yet.

Help: Changing variables in the base class(aka giving combos 4+ keys)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help: Changing variables in the base class(aka giving combos 4+ keys)

    // Combo Class:

    class Combo extends Info;
    // blah blah
    var int keys[4];
    // blah blah

    --------- --------- ---------

    // What I want:

    class blahCombo extends Combo;
    var int keys[8] // or more
    // do speed combo for testing

    --------- --------- ---------

    However, I get an error:
    Warning, 'keys' obscured 'keys' defined in base class.

    The combo doesn't work when I press the keys. It has to be without the warning for it to work So, how can I fix this? If I cannot get around the warning, I'll have to do mass work

    #2
    There's no way to change the number of keys for a combo. It's not only the array in the Combo class, there's also a whole lot of code behind it in the xPlayer and Bot classes.

    Also any variables defined in a subclass is a completely new variable (even if it has the same name) that will not be used by the super class.

    Comment

    Working...
    X