seba1976 98 Posted September 5, 2015 What would be the right way to do this: class SoldierGB; class I_G_Soldier_base_F : SoldierGB { class EventHandlers : EventHandlers { init = ""; }; }; The game shows an undefined class "EventHandlers" error message, and refuses to run. I've had the same problem with similar sub classes that are defined within the parent class, but it's definition is not carried over to the new class scope. Like here: class NVGoggles; class NVGoggles_INDEP : NVGoggles { class ItemInfo : ItemInfo { uniformModel = "A3\weapons_f\binocular\nvg_proxy_OPFOR.p3d"; modelOff = "A3\weapons_f\binocular\NVG_proxy_off_OPFOR.p3d"; }; Even when ItemInfo class is defined in NVGoggles, the parser stops with an undefined class when used within the child class NVGoggles_INDEP, and I have no clue how to make it available inside the new class. Seems more a parser problem than a real one, but I certainly don't know enough. Share this post Link to post Share on other sites
da12thMonkey 1943 Posted September 5, 2015 IIRC you have to first call the parent subclass from inside the class call to which it belongs. class soldierGB { class EventHandlers; }; class I_G_Soldier_base_F : SoldierGB { class EventHandlers : EventHandlers { init = ""; }; }; Share this post Link to post Share on other sites
seba1976 98 Posted September 6, 2015 class NVGoggles { class ItemInfo; }; class NVGoggles_INDEP : NVGoggles { class ItemInfo : ItemInfo { uniformModel = "A3\weapons_f\binocular\nvg_proxy_OPFOR.p3d"; modelOff = "A3\weapons_f\binocular\NVG_proxy_off_OPFOR.p3d"; }; Almost did it, but then when previewing a unit: Share this post Link to post Share on other sites
da12thMonkey 1943 Posted September 6, 2015 Well, you are missing a }; at the end there but maybe that's just a copy& paste error. Thinking about it, you may also need the parent class for the class that contains the subclass you want to access too: class Binocular; class NVGoggles : Binocular { class ItemInfo; }; class NVGoggles_INDEP : NVGoggles { class ItemInfo : ItemInfo { uniformModel = "A3\weapons_f\binocular\nvg_proxy_OPFOR.p3d"; modelOff = "A3\weapons_f\binocular\NVG_proxy_off_OPFOR.p3d"; }; }; 1 Share this post Link to post Share on other sites
seba1976 98 Posted September 6, 2015 :) Yes! That was it. Thanks a lot! 1 Share this post Link to post Share on other sites