Wolfius 0 Posted December 24, 2002 The question is to BIS... You allready have class heritage in your game, that is each addon must be "descended" from a certain high-level class. The question is, is it possible to add polymorphic classes in the future, that is one class comprising of tho or three. And is it possible to do without rewriting the core of the engine. In some post I read before, Suma stated that with current engine limitations it is not possible, for example, to make a wheeled vehicle have TOW properties. But with polymorph classes it seems possible. Having something like that: class add: Car {}; // is normal addon class add: Car {}, Tank {}; - is polymorph, addon inheriting car and tank features(car's features is primiry, tank's - secondary(additional)). So , the main question is it possible with current engine limitations? P.S. Sorry for my English, I hope you understand the question! Share this post Link to post Share on other sites
Harnu 0 Posted December 24, 2002 You mean like in game or out of game you take an M2 Carl Gustav as rig it to the top of a vehicle basically? Share this post Link to post Share on other sites
Wolfius 0 Posted December 24, 2002 Sorry man, I did not get what you meant by saying "in-game" or "out of game"! Can you clear it out for me, please ... What I meant basically is this: When you create addon, you must define in cpp file what class does this object use, for example M2A2 is M113 class... etc. Defining a new class using the methods of TWO or more classes is what I meant, thus giving certain addon the properties of both, thus you can have a wheeled vehicle with rocket system. All this would be possible due to class comprising of methods and variables used in two different classes. Hope this one cleares it out for you  Priorities and collisions of those methods used in both inherited classes(in our eg. CAR, TANK) could be solved by using the the first class mentioned in the definition string(in order of appearence). Its methods will be used as primary. Primary methods of a class will be used in all cases ... e.g.: class Addon: Car {}, Tank {} In this case Addon is of a Car class, and it will move as a car, do everything as a car, but those specific features present in Tank class will be given to "Addon". P.S. So the questions remains, will this be possible to integrate such a feature - "polymorhic classes" in future patches, or will it need the whole core engine rewriting to do this? With respect, Wolfius Share this post Link to post Share on other sites