OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Ding on 21 Dec 2004, 09:31:35

Title: getting animations to play on attack
Post by: Ding on 21 Dec 2004, 09:31:35
Hi, :)

I am making an addon and i would like some help please,
in the config what is the command to play an animation on attack (when clicking) and where in the config it should go. I serched the site but dident find anything, i know this is possible but i dont know how, i hope you people can please help me :D .

thankyou,
ding
Title: Re:getting animations to play on attack
Post by: Lean Bear on 21 Dec 2004, 14:12:12
This really depends on the addon you are making, but you will need this in you config: (note - the following is for a melee weapon)

class CfgPatches
{
   class YourAddonName
   {
      units[] = {};
      weapons[] = {YourWeaponName};
      requiredVersion = 1.75;
   };

   class NewMove
   {
      units[] = {};
      weapons[] = {};
      requiredVersion = 1.10;
   };
};

class CfgMovesMC
{
   class Default {};
   class CombatStrokeGun: Default {};
   class States
   {

         class YourAnimClassName: CombatStrokeGun
      {
                                  file=\YourAddonFolderName\YourAnimName.rtm;
         speed=-3;
         looped=false;
                                  soundEnabled=false;
                                  duty = RestDuty;
         interpolationSpeed=1;
         connectFrom[]={Combat,1};
         connectTo[]={Combat,1};
      };
   };
};