Spender 0 Posted March 21, 2010 (edited) Solved; Check last post for example config. ------ Hey Im currently trying to get the gunbarrels on a minigun rotating...Said minigun is mounted on an fictional APC. So, to figure out how to do it, I grabbed an addon which had rotating gunbarrels; the "Warthog" jeep from the 3148 SciFi Mod. Aparently, its done this way (correct me if Im wrong): Define something in Oxygen you want to rotate, (as "barrels" for example), then use the following part in the config: Animated=1; class ReloadAnimations { class Gatling { weapon="Gatling"; angle0=0 angle1="-2 * 3.141592654"; multiplier=500 type="rotation"; animPeriod=1 selection=Barrel; begin="usti hlavne"; end="konec hlavne"; }; }; However Im not able to get it working. To be honest, I dont even know where to put it in my config... Also, my APC is defined as a tank. Does it even work with tanks? This is my config WITHOUT the minigun scripting. "HelAPC" is my APC, "Gatling" my weapon. #define TWest 1 #define TracerNColor 0,0,0 #define TracerNColorF {TracerNColor,0.00} #define TRACER_N_ALWAYS tracerColor[]=TracerNColorF;tracerColorR[]=TracerNColorF #define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 #define WeaponHardMounted 65536 #define CanSeeRadar 1 #define CanSeeEye 2 #define CanSeeOptics 4 #define CanSeeEar 8 #define CanSeeCompass 16 #define CanSeeRadarC CanSeeRadar+CanSeeCompass #define CanSeeAll 31 class CfgModels { class Default {}; class Vehicle: Default {}; class Tank: Vehicle {}; class HelAPC: Tank {}; }; class CfgPatches { class HelAPC { units[] = {HelAPC}; weapons[] = {}; requiredVersion = 1.46; }; }; class CfgAmmo { class Default{}; class BulletSingle: Default {}; class Bullet7_6: BulletSingle {}; class Bullet12_7: Bullet7_6 {}; class Gatling: Bullet12_7 { airLock=1; cartridge="FxCartridge"; hit=80; indirectHit=20; indirectHitRange=0; tracerColor[]={1,0.15000,0.07500,1}; minRange=1; minRangeProbab=1; midRange=1500; midRangeProbab=0.5; maxRange=1500; maxRangeProbab=0.1; }; }; class CfgWeapons { class default {}; class MGun: Default {}; class MachineGun7_6: MGun {}; class MachineGun12_7: MachineGun7_6 {}; class Gatling: MachineGun12_7 { ammo="Gatling"; displayName="Gatling"; sound[]={"\HelAPC\Sound\Gatling.wav",db+10,1.2}; reloadMagazineSound[]={"\HelAPC\Sound\Reload.ogg",0.2,1}; soundContinuous=0; magazine="Gatling"; displayNameMagazine="Gatling"; shortNameMagazine="Gatling"; count=2500; multiplier = 3; soundContinous=0; muzzlePos="usti hlavne"; muzzleEnd="konec hlavne"; reloadTime=0.0923; magazineReloadTime=2; initSpeed=825; dispersion=0.00075; maxLeadSpeed=990; opticsZoomMin=0; opticsZoomMax=0.25; aiRateOfFire=2.0; aiRateOfFireDistance=20000; autoReload=0; autoFire=1; optics=1; }; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class LandVehicle: Land {}; class Tank: LandVehicle {}; class APC: Tank {}; class M113 : APC {}; class HelAPC: M113 { vehicleClass="Helghan Empire"; displayName="Helghast APC"; model="\HelAPC\HelAPC.p3d"; crew="WH40K_PDFsoldierAu"; gunnerOpticsColor[]={0.910000,0.00000,0.00000,0.5}; gunnerOpticsModel="optika_zsu_gunner"; gunnerInAction="ManActpbrgunner"; transportSoldier = 10; armor=1000; armorStructural=2.0; class HitEngine {armor=1.2;material=60;name=engine;passThrough=1;} class HitHull {armor=1;material=50;name=hull;passThrough=1;}; class HitTurret {armor=0.8;material=51;name=turet;passThrough=1;}; class HitGun {armor=0.6;material=52;name=gun;passThrough=1;}; armorHull=1; armorTurret=0.8; armorGun=0.6; armorEngine=0.8; armorLights=0.4; irScanRange = 6000; unitInfoType="UnitInfoShip"; weapons[]={Gatling}; magazines[]={Gatling,Gatling}; canfloat=1; airlock=1; irlock=1; nightVision=1; irTarget =1; irScanGround=1; laserScanner=1; }; Any ideas where to put it? Edited March 21, 2010 by Spender Share this post Link to post Share on other sites
sanctuary 19 Posted March 21, 2010 I never made anything like this myself, but considering the BIS Vulcan vehicle features a rotating gun, and is an APC too, have you tried to give a look to both the model (use odol explorer as the model is certainly binarized) and the config (use binview to convert it in config.cpp as i guess it is a config.bin) of the vulcan.pbo (located in Res\Addons\ ) ? If none can help you on this, i think you may find the answer inside of this pbo. Share this post Link to post Share on other sites
Spender 0 Posted March 21, 2010 I never made anything like this myself, but considering the BIS Vulcan vehicle features a rotating gun, and is an APC too, have you tried to give a look to both the model (use odol explorer as the model is certainly binarized) and the config (use binview to convert it in config.cpp as i guess it is a config.bin) of the vulcan.pbo (located in Res\Addons\ ) ?If none can help you on this, i think you may find the answer inside of this pbo. Damn, Binview doesnt work for me (An unknown error occured, Errorcode= 32765) Ok I think Im going to ask in the 3148 thread...They should be able to help. Share this post Link to post Share on other sites
Spender 0 Posted March 21, 2010 (edited) Damn, Binview doesnt work for me (An unknown error occured, Errorcode= 32765) Ok I was able to open the "AL97 Hannbal"-addon, which is defined as a tank and features a minigun. Both utilize the same "class ReloadAnimations" lines in their config, and no exterior animation file. So it should be possible to just simply add the lines in my config, just where exactly I have yet to find out. Edited March 21, 2010 by Spender Share this post Link to post Share on other sites
Spender 0 Posted March 21, 2010 Sorry for the spam, but I got it :D Im posting the working config here. Apart from the minigun the APC has no "special" stuff, so its config is a good example for others to learn from. With this config, you just have to define one part of your model in Oxygen as "Gatling", and it will then rotate ingame. #define TWest 1 #define TracerNColor 0,0,0 #define TracerNColorF {TracerNColor,0.00} #define TRACER_N_ALWAYS tracerColor[]=TracerNColorF;tracerColorR[]=TracerNColorF #define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 #define WeaponHardMounted 65536 #define CanSeeRadar 1 #define CanSeeEye 2 #define CanSeeOptics 4 #define CanSeeEar 8 #define CanSeeCompass 16 #define CanSeeRadarC CanSeeRadar+CanSeeCompass #define CanSeeAll 31 class CfgModels { class Default {}; class Vehicle: Default {}; class Tank: Vehicle {}; class HelAPC: Tank {}; }; class CfgPatches { class HelAPC { units[] = {HelAPC}; weapons[] = {}; requiredVersion = 1.46; }; }; class CfgAmmo { class Default{}; class BulletSingle: Default {}; class Bullet7_6: BulletSingle {}; class Bullet12_7: Bullet7_6 {}; class Gatling: Bullet12_7 { airLock=1; cartridge="FxCartridge"; hit=80; indirectHit=20; indirectHitRange=0; tracerColor[]={1,0.15000,0.07500,1}; minRange=1; minRangeProbab=1; midRange=1500; midRangeProbab=0.5; maxRange=1500; maxRangeProbab=0.1; }; }; class CfgWeapons { class default {}; class MGun: Default {}; class MachineGun7_6: MGun {}; class MachineGun12_7: MachineGun7_6 {}; class Gatling: MachineGun12_7 { ammo="Gatling"; displayName="Gatling"; sound[]={"\HelAPC\Sound\Gatling.wav",db+10,1.2}; reloadMagazineSound[]={"\HelAPC\Sound\Reload.ogg",0.2,1}; soundContinuous=0; magazine="Gatling"; displayNameMagazine="Gatling"; shortNameMagazine="Gatling"; count=2500; multiplier = 3; soundContinous=0; muzzlePos="usti hlavne"; muzzleEnd="konec hlavne"; reloadTime=0.0923; magazineReloadTime=2; initSpeed=825; dispersion=0.00075; maxLeadSpeed=990; opticsZoomMin=0; opticsZoomMax=0.25; aiRateOfFire=2.0; aiRateOfFireDistance=20000; autoReload=0; autoFire=1; optics=1; }; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class LandVehicle: Land {}; class Tank: LandVehicle {}; class APC: Tank {}; class M113 : APC {}; class HelAPC: M113 { vehicleClass="Helghan Empire"; displayName="Helghast APC"; model="\HelAPC\HelAPC.p3d"; crew="WH40K_PDFsoldierAu"; gunnerOpticsColor[]={0.910000,0.00000,0.00000,0.5}; gunnerOpticsModel="optika_zsu_gunner"; gunnerInAction="ManActpbrgunner"; transportSoldier = 10; armor=1000; animated=1; class ReloadAnimations { class Gatling { weapon = Gatling; angle0 = 0; angle1 = "-2 * 3.141592654"; multiplier = 5000; type = rotation; animPeriod = 1; selection = Barrel; begin = "usti hlavne"; end = "konec hlavne"; }; }; armorStructural=2.0; class HitEngine {armor=1.2;material=60;name=engine;passThrough=1;} class HitHull {armor=1;material=50;name=hull;passThrough=1;}; class HitTurret {armor=0.8;material=51;name=turet;passThrough=1;}; class HitGun {armor=0.6;material=52;name=gun;passThrough=1;}; armorHull=1; armorTurret=0.8; armorGun=0.6; armorEngine=0.8; armorLights=0.4; irScanRange = 6000; unitInfoType="UnitInfoShip"; weapons[]={Gatling}; magazines[]={Gatling,Gatling}; canfloat=1; airlock=1; irlock=1; nightVision=1; irTarget =1; irScanGround=1; laserScanner=1; }; Share this post Link to post Share on other sites