der bastler 0 Posted June 6, 2003 I found this class inside the M113 Vulcan's class <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">  class ReloadAnimations  {     class VulcanCannon     {       weapon="VulcanCannon";       angle0=0;       angle1="-2 * 3.141592654";       multiplier=500;       type="rotation";       animPeriod=1;       selection="gatling";       begin="usti hlavne";       end="konec hlavne";     };  }; Is it possible to implement this animation class in normal firearms classes (CfgWeapon)? At least, is it possible to access the "fired" event from within a firearm?  Share this post Link to post Share on other sites
quakergamer 0 Posted June 7, 2003 As far as I know, it is possible to impliment it to make a part of your weapon turn when you've shot a bullet. Look at BIS Grenade Launchers! Share this post Link to post Share on other sites
der bastler 0 Posted June 7, 2003 The MM-1 uses a different effect: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class mygun: Riffle {  [...]  revolving = "myselection"  revolvingaxis = "myaxis" }; Problem: "myselection" would rotate around "myaxis" in steps of (360°/ammocount), i.e. it performs one complete revolution per magazine (this function was designed for revolvers)! That would be very slow for a minigun with 500+ shots... Hmm, seems class ReloadAnimations is constricted to vehicles? Share this post Link to post Share on other sites
PicVert 0 Posted June 7, 2003 If u would make a weapon mounted on tripod like the machine gun a solution is to make as a vehicle like M113 Vulcan but put fuel = 0 and maxspeed = 0 but maybe you know that Share this post Link to post Share on other sites
der bastler 0 Posted June 7, 2003 Yes, I know that, but I wanted to create an infantry-minigun. *sigh* Guess I've to change the plans... <s>Minigun</s> Well, let's equip Weyland-Yutani with a portable machine cannon... Share this post Link to post Share on other sites
PicVert 0 Posted June 7, 2003 That would be very slow for a minigun with 500+ shots... Have u try to change the reload time and with the use of burst or Auto I think the reload animation should be much more speedly but maybe I m wrong.. Share this post Link to post Share on other sites
der bastler 0 Posted June 7, 2003 No, the "revolving" animation is intended to be used with revolvers: Every time a reload happens the named selection rotates to feed the chamber with a new catridge/grenade. That means that the named selection rotates (360/ammocount)° per shot. After ammocount shots a full revolution is completed. In my case you have 500+ shots --and the barrels only turn (360/500)°=0.72° per shot. Conclusion: Only use "revolving" to visualize ammo feed of your weapon... Ok, we've found another OFP engine limitation. Result: instead of a minigun the Weyland-Yutani elite troops will have a machine cannon gunner. Kord? Mauser? Some aircraft cannon scaled down to infantry purposes?. Anyway, the weapon's slogan: "Fat, ugly and with a big boom!" Share this post Link to post Share on other sites
PicVert 0 Posted June 8, 2003 humm I think it's not a limitation, U have to try the event "Fired" in CfgVehicle of your soldier who transport the weapon for launching a script who can animate the gun. Im not a real codder so I prefer to not tell too much about _this Share this post Link to post Share on other sites
der bastler 0 Posted June 8, 2003 Well, if I launch a script from a soldier, the weapon effect is limited to this soldier... ...you see, no way out... Share this post Link to post Share on other sites
PicVert 0 Posted June 9, 2003 you can start the script as eventhandler in mission to a trigger or init field of commander of the group maybe ? just put the script in the pbo and call it when you edit the mission. I think it's a possible way. Share this post Link to post Share on other sites
der bastler 0 Posted June 9, 2003 Yeah, I try to avoid additional scripting outside the addon but it seems to be the only way regarding Plasmagun (watch this) or Flamethrower. At least another engine limitation... *sigh* *nodstowardsBIS* *SIGH* Share this post Link to post Share on other sites