Creating Animations

From Bohemia Interactive Community
Revision as of 09:56, 13 March 2009 by Mikero (talk | contribs)
Jump to navigation Jump to search

There are three animation types in Arma/Ofp

  • Island Animations
used as background mission play to front screen of arma/ofp
  • Vehicle Animations
used to open doors, climb ladders etc
  • Mission animations
as declared by switchMove and PlayMove commands in missions.

This document describes howto add your own animation to a mission.

Note that switchMove and Playmove commands DO NOT WORK in the init field of a mission sqm
They *only* 'work' after mission has been loaded.
Nor will they work up front in a sqs or sqf file.
A delay is required until mission is loaded.

Essentially you have to add onto the existing animations held in ~Arma/Anims.pbo.

Specifically, the cfgMoveBasic class and family held in Anim/Characters/Config.bin

to do so:

;init.sqs eg
~1 ; delay until mission loaded
PoorSoldier switchmove "mydrop"
exit
//mission sqm
class Mission
{
 addOns[]={MyPboName,,,,,
//config.cpp
class CfgPatches
{
 class MyPboName
 {
  units[] = {};
  weapons[] = {};
  requiredVersion = 0.27;
  requiredAddons[] = {CA_Anims_Char};
 };

};

You can, of course, put anything you like in your config,cpp. This document deals only with what is relevant to creating animations. No other information incidentally is required. You can use this pbo, without other classes, as is.

class CfgMovesMaleSdr // adds to existing CfgMovesMaleSdr in Anims.pbo
{
 class States
 {
  class AdthPercMstpSlowWrflDnon_1; // some pre-declared animation
  class mydrop: AdthPercMstpSlowWrflDnon_1
  {
   file = "\MyPbo\SomeWhere\MyRtmFile"; // (.rtm is assumed)
   speed = 0.58;
  };
 };
};

Naturally and of course, you would want to build up a potentially much more powerful animation than above. To do so, look inside the characters/config.cpp

Note that:

  • class MyPbo is the addons[]= in the mission.sqm
  • "\myPbo" is the prefix name (if any) you give to your pbo
  • "mydrop" is the name of the animation