OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Bluelikeu on 14 Jun 2005, 22:53:55

Title: How to config an Animation?
Post by: Bluelikeu on 14 Jun 2005, 22:53:55
Hello all,

Say I've created an animation and want it to run in the game. How do I do that?

Thanks,
Bluelikeu
Title: Re:How to config an Animation?
Post by: General Barron on 16 Jun 2005, 20:10:31
Wouldn't you like to know... HAHAHAHAHAHAHAHAAHA!!!!!!!!!

....

...But seriously, this is a question that NOBODY really knows the entire answer to, IMO. And if somebody does, they aren't telling, because I've tried asking around and looking for tutorials, to no avail. So I've pretty much had to figure out as much as I could on my own... and I still can't configure most anims I want to.

I have started on a tutorial, although I stopped working on it a while ago, and it is VERY incomplete. I can email it to you later if you want.
Title: Re:How to config an Animation?
Post by: penguinman on 16 Jun 2005, 21:54:20
ya i cant figure any thing out either, i made an animation that is a freestyle swim and its alot like the crawling animation but i dont know what to inherit it from,


but if your animation is a dying animation i can help you, i made some and some people helped me and i know how to config stand dying.
Title: Re:How to config an Animation?
Post by: Bluelikeu on 16 Jun 2005, 22:43:27
jeesh, people are so selfish.

Anyway, my animation is well, nothing. I just suppose i moved a few objects around in the animation maker and created a useless animation.

Anyway, I need help

PS: Why doesn't OFPEC petition a search for how to add animations. The person or persons who reach this goal will have their name plastered somewhere.
Title: Re:How to config an Animation?
Post by: General Barron on 25 Jun 2005, 08:42:48
Sorry, I've been on vacation for the last week. Check your email though.
Title: Re:How to config an Animation?
Post by: Lean Bear on 29 Jun 2005, 21:53:46
If General B's anim config tut doesn't help (which it should - especially if you're only trying to make a simple fx anim (like one you'd only ever use by using the switchMove command)) then either tell me your problemos on msn, or:

1. The basic anim config layout:

Code: [Select]
class CfgPatches
{
   class AddonClassName
   {
      units[] = {};
      vehicles[] = {};
      weapons[] = {};

      requiredVersion = 1.91;
   };

   class NewMove
   {
      units[] = {};
      vehicles[] = {};
      weapons[] = {};
      
      requiredVersion = 1.30;
   };
};


You gots to put that at the start of your config.

2. Find an anim (in the Com Ref, under CfgMovesMC) which is remotely like yours in terms of whether it is static or not, whether it is running, walking, crawling, dying etc. (what the anim looks like itself doesn't really matter unless you want to link to/from it.

3.  Now you have to write the custom bit:

Code: [Select]
class CfgMovesMC
{
   class Default {}; // Here you list all the paths of inheritance for the anims that YOU made under
   class CombatStrokeGun: Default {}; // the "class States" class :P
   class CombatStrokeGunEnd: CombatStrokeGun {};

   class States
   {
      class Your_CombatStrokeGun: CombatStrokeGun
      {
         actions = CombatActions;
         file=\AddonFolderName\animname1.rtm;
         speed=-3.6;
         looped=false;
         disableWeapons=true;
         soundEnabled=true;
         duty = SprintDuty;
         interpolateTo[]={CombatDying,0.1,CombatDyingVer2,0.1,CombatDyingVer3,0.1};
         connectFrom[]={Combat,1};
         connectTo[]={You_CombatStrokeGunEnd,1};
      };

      class Your_CombatStrokeGunEnd: CombatStrokeGunEnd
      {
         actions = CombatActions;
         file=\AddonFolderName\animname2.rtm;
         ......
   
         Don't remember off the top of my head how this goes

         ......

         interpolateTo[]={CombatDying,0.1,CombatDyingVer2,0.1,CombatDyingVer3,0.1};
      };
   };
};

This is just an example for a custom StrokeGun anim. Off course, if your anim is even more simple or just a static - then you should have no trouble fifuring out how to do it ;)

btw General B, I thought you had the config thing sussed out? What are you having trouble with?
Title: Re:How to config an Animation?
Post by: General Barron on 30 Jun 2005, 01:27:09
Quote
btw General B, I thought you had the config thing sussed out? What are you having trouble with?
Well, after trying to configure some more complex anims (to no success), I got a little frustrated and gave up on anims (and my tut) for a while.

Talking about it has got me interested again, and I finished a couple more chapters in the tut, as well as some example problems. One of these days I'll finish the darn thing...