DZGuymed 10 Posted March 22, 2011 Hi everyone. I'm back with more config troubles. Today I decided I wanted to make a custom Su-34 loadout using the awesome missiles included in the GLT Missilebox, but since most of my config work relies on inheritance, I can't figure out how to make a turret config my anti-ship Su-34. (Turret as in the gunner seat of the plane, where the weapons technically are located.) I tried working off of the Su-34s original turret config, but I had no idea what to do with it. Here is my base config for the vehicle: class Su34; class DZG_GUAF_Su34_AS: Su34 { displayName = "(GUAF-AF) Su-34 (Anti-Ship)"; weapons[] = {CMFlareLauncher}; magazines[] = {120Rnd_CMFlare_Chaff_Magazine}; vehicleClass = "DZG_AirVehicleClass"; faction = "GUAF"; crew = "DZG_GUAF_Pilot"; side = 1; I'm basically asking if anyone could guide me in making a turret config that would work exclusively on this custom vehicle. Share this post Link to post Share on other sites
[frl]myke 14 Posted March 23, 2011 This is from the Missilebox config which also includes inherited BIS planes: class GLT_Su34_Laser : Su34 { weapons[] = {"CMFlareLauncher"}; magazines[] = {"120Rnd_CMFlare_Chaff_Magazine"}; class Turrets { class MainTurret : NewTurret { weapons[] = {"GSh301", "GLT_Ch29LauncherLaser", "GLT_Ch29Launcher_IR", "R73Launcher", "80mmLauncher"}; magazines[] = {"180Rnd_30mm_GSh301", "GLT_4Rnd_Ch29LBIS", "GLT_2Rnd_Ch29TBIS", "4Rnd_R73", "40Rnd_S8T"}; }; }; }; Hope this helps. Share this post Link to post Share on other sites
.kju 3244 Posted March 23, 2011 Su34 has class Su34: Plane { class Turrets { class MainTurret: NewTurret { So a fully correct inheritance would be: class MySu34: Su34 { class Turrets: Turrets { class MainTurret: MainTurret { Share this post Link to post Share on other sites
DZGuymed 10 Posted March 23, 2011 Thanks for the help guys, but when I compile in BinPBO, it fails and my log file gives me this: line 344: /CfgVehicles/DZG_GUAF_Su34_AS.Turrets: Undefined base class 'Turrets' Here's what I've come up with in my Su-34 config. class Su34; class DZG_GUAF_Su34_AS: Su34 { displayName = "(GUAF-AF) Su-34 (Anti-Ship)"; weapons[] = {CMFlareLauncher}; magazines[] = {120Rnd_CMFlare_Chaff_Magazine}; vehicleClass = "DZG_AirVehicleClass"; faction = "GUAF"; crew = "DZG_GUAF_Pilot"; side = 1; class Turrets: Turrets { class MainTurret: MainTurret weapons[] = {"GSh301", "80mmLauncher", "GLT_AS4_Launcher", "GLT_CH59_Launcher", "GLT_R77_Launcher", "GLT_R73_Launcher"}; magazines[] = {"180Rnd_30mm_GSh301", "40Rnd_S8T", "GLT_2Rnd_AS4", "GLT_4Rnd_CH59", "GLT_2Rnd_R77", "GLT_2Rnd_R73"}; }; class UserActions { class defaultAction { priority = 0; shortcut = ""; displayNameDefault = ""; position = ""; radius =2; onlyforplayer = 1; displayName = "GPS/INS System"; condition = "(isengineon this) && (player == (driver this))"; statement = "createDialog 'glt_airgpsmfd'"; }; }; Share this post Link to post Share on other sites
.kju 3244 Posted March 23, 2011 You need to define all classes you inherit from. Use this (hack/trick): class Turrets; class MainTurret; class cfgVehicles { class Su34; class DZG_GUAF_Su34_AS: Su34 { Share this post Link to post Share on other sites
DZGuymed 10 Posted March 23, 2011 You need to define all classes you inherit from.Use this (hack/trick): class Turrets; class MainTurret; class cfgVehicles { class Su34; class DZG_GUAF_Su34_AS: Su34 { Thanks. I've managed to get the addon to compile, but when I select the aircraft in the editor and try to use it, I receive multiple turret related errors, such as GunSmoke, PrimaryGunner and FireAnim. I don't have any idea what to do next, so I'll just put the partially fixed config here. Thanks for the help so far. class Su34; class DZG_GUAF_Su34_AS: Su34 { displayName = "(GUAF-AF) Su-34 (Anti-Ship)"; weapons[] = {CMFlareLauncher}; magazines[] = {120Rnd_CMFlare_Chaff_Magazine}; class Turrets: Turrets { class MainTurret: MainTurret { weapons[] = {"GSh301", "80mmLauncher", "GLT_AS4_Launcher", "GLT_CH59_Launcher", "GLT_R77_Launcher", "GLT_R73_Launcher"}; magazines[] = {"180Rnd_30mm_GSh301", "40Rnd_S8T", "GLT_2Rnd_AS4", "GLT_4Rnd_CH59", "GLT_2Rnd_R77", "GLT_2Rnd_R73"}; }; }; vehicleClass = "DZG_AirVehicleClass"; faction = "GUAF"; crew = "DZG_GUAF_Pilot"; side = 1; class UserActions { class defaultAction { priority = 0; shortcut = ""; displayNameDefault = ""; position = ""; radius =2; onlyforplayer = 1; displayName = "GPS/INS System"; condition = "(isengineon this) && (player == (driver this))"; statement = "createDialog 'glt_airgpsmfd'"; }; }; }; Share this post Link to post Share on other sites
.kju 3244 Posted March 23, 2011 Upload your rpt to some temp host or pastebin: http://community.bistudio.com/wiki/arma.RPT Share this post Link to post Share on other sites
DZGuymed 10 Posted March 23, 2011 Here's a link to my entire config. http://pastie.org/private/oizehoytim6ysbibypujva Just in case anyone's wondering, I'm not releasing this. It's not release worthy, plus I only intended it for private use/skills testing. Share this post Link to post Share on other sites
.kju 3244 Posted March 23, 2011 The rpt please (too). Share this post Link to post Share on other sites
DZGuymed 10 Posted March 23, 2011 The rpt please (too). I'm not sure I have an RPT. Whatever that is... in my workfolder, I only have a config.cpp file. ---------- Post added at 06:15 PM ---------- Previous post was at 05:14 PM ---------- Wait... here is an RPT with the errors in it: http://pastie.org/1705885 Share this post Link to post Share on other sites
.kju 3244 Posted March 24, 2011 Missing items in requiredAddons: http://pastebin.jonasscholz.de/1351 My suggestion is to define all from BI, even when unnecessary. It is the least work and always works. That said you may want to make this a replacement addon instead. This way you don't have to modify missions or create new ones. Share this post Link to post Share on other sites
DZGuymed 10 Posted March 24, 2011 Missing items in requiredAddons:http://pastebin.jonasscholz.de/1351 My suggestion is to define all from BI, even when unnecessary. It is the least work and always works. That said you may want to make this a replacement addon instead. This way you don't have to modify missions or create new ones. Thanks so much! I never realized that requiredAddons actually mattered; I thought that as long as you define the required class for each part of the addon you'd be fine. Adding all those classes to requiredAddons made it work. Share this post Link to post Share on other sites
NutzMcKracken 17 Posted March 24, 2011 this will help to understand inheritance among other things :) http://www.armastack.info/index.php/297/how-do-i-use-class-inheritance-correctly#a298 Share this post Link to post Share on other sites