TheRedBaron 0 Posted July 11, 2004 ok, Im making a gattling gun and I want the four barrels to rotate when i turn it on. Im just not quit sure how to do this in my config. The model has the two point axis called barrels_axis and the barrels are called...well barrels. I want to have an action to start the barrels rotating and an action to stop the barrels from rotating,or if possible to rotate the barrels while firing. Here is the config ,I have the barrels set up to rotate on startup and just keep rotating because i dont know how to do the other things i mentioned. They arent rotating though. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches { class Terroristgat { units[]={Terroristgat}; weapons[]={gat}; requiredVersion=1.00000; }; }; class CfgModels { class Default{}; class Weapon: Default{}; class gat : Weapon{}; }; class CfgRecoils { gatRecoil[]={0.002,0.002,0.005,0.005,0,0}; }; class CfgAmmo { class default {}; class BulletSingle: default {}; class gat: BulletSingle { hit=7; indirectHit=1; indirectHitRange=0.050000; minRange=1; minRangeProbab=0.100000; midRange=50; midRangeProbab=0.900000; maxRangeProbab=0.050000; cartridge="FxCartridgeSmall"; }; }; class CfgWeapons { class Default {}; class MGun: Default {}; class Riffle: MGun {}; class m60 : Riffle {}; class gat: m60 { access=2; autoReload=0; model="\gat\gat.p3d"; displayName="gattling gun"; displayNameMagazine="gattling mag"; magazines[]={"gat"}; dexterity=1.5; shortNameMagazine="gat"; MagazineType=32; count=500; initSpeed=500; reloadTime=.010000; magazineReloadTime=10; picture="\gat\mp5k.pac"; drySound[]={"\gat\none.wav",0.003162,1}; modes[]={"FullAuto"}; animated=1; Â Â Â Â Â class FullAuto { Â Â Â Â Â Â ammo=gat; Â Â Â Â Â Â multiplier=1; Â Â Â Â Â Â burst=1; Â Â Â Â Â Â displayName="gattling gun"; Â Â Â Â Â Â dispersion=0.015000; Â Â Â Â Â Â soundContinuous=0; Â Â Â Â Â Â reloadTime=0.010000; Â Â Â Â Â Â ffCount=1; Â Â Â Â Â Â recoil=gatRecoil; Â Â Â Â Â Â autoFire=true; Â Â Â Â Â Â aiRateOfFire=1.000000; Â Â Â Â Â Â aiRateOfFireDistance=50; Â Â Â Â Â Â useAction=0; Â Â Â Â Â Â useActionTitle=""; reloadMagazineSound[]={"\gat\reload.wav",0.000316,1}; sound[]={"\gat\fire.wav",0.131623,0.95000}; }; class Animations { class ani_barrels { type="rotation"; animperiod=10000; angle0=0; angle1="-20000 * 3.141592654"; multiplyer=20; axis="barrels_axis"; selection="barrels"; }; }; class eventhandlers { init="(_this select 0) animate [""ani_barrels"", 1]"; }; }; }; class CfgVehicles { class All{}; class AllVehicles:All{}; class Land:AllVehicles{}; class Man:Land{}; class Soldier:Man{}; class SoldierGB:Soldier{}; class Terroristgat: SoldierGB { access=2 displayName="Terroristgat"; weapons[]={"Throw","Put","gat"}; magazines[]={"gat","gat","gat"}; }; }; class CfgNonAIVehicles { class ProxyWeapon {}; class ProxyTerroristgat : ProxyWeapon {}; }; Share this post Link to post Share on other sites
Scud 0 Posted July 12, 2004 I would start by running a sqs file from the Fired EH that way the animation will start when the gun is fired. ]<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class EventHandlers { fired = "[_this select 0] exec  ""\vickers\vickersshot.sqs"";[_this select 0] exec  ""\vickers\vickersfeed.sqs"" "; }; }; In this case the barrel doesn't turn but the bullts feeding into the gun and ejecting from the gun are animated. I would also move this over to Breathe/Addon Config and Scripting. Might get better response. Share this post Link to post Share on other sites
TheRedBaron 0 Posted July 12, 2004 Thanks for the help scud, could a mode move this to Breathe/Addon Config and Scripting. Share this post Link to post Share on other sites
Messiah 2 Posted July 13, 2004 maybe depbo the bas choppers and check out how they did their minigun barrel rotation... that should lend some clues Share this post Link to post Share on other sites
TheRedBaron 0 Posted July 13, 2004 well i figured it out by looking at the anaconda(revolver) from the crime city weapons pack but the barrels turn very slowly and i dont know how to speed them up Incase you want to know you just make an axis in the memory lod, define your rotating part in o2 and name it cylinder( i think other names will work but havent tested), then in your weapon config add in <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> revolving="cylinder"; revolvingAxis="axis"; Share this post Link to post Share on other sites
Scud 0 Posted July 13, 2004 I think its just by shortening the animperiod try "animperiod=5000;" it should double the speed Share this post Link to post Share on other sites
TheRedBaron 0 Posted July 13, 2004 Nope didnt work, I think its because its not an animation class. Maybe something like revolvingSpeed or something. Share this post Link to post Share on other sites
offtime 0 Posted July 13, 2004 it is all about animating static gut wich is vehicle class animating hand gun would be real task Share this post Link to post Share on other sites
bmgarcangel 0 Posted July 13, 2004 maybe depbo the bas choppers and check out how they did their minigun barrel rotation... that should lend some clues lol I look at there scripts and they just confuse me Any baron, good luck on your gattling gun Share this post Link to post Share on other sites
TheRedBaron 0 Posted July 14, 2004 well i got it to turn real slow but i cant speed it up Share this post Link to post Share on other sites