Creating Animations

From Bohemia Interactive Community
Revision as of 09:48, 13 March 2009 by Mikero (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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:

Therefore, in the intro.sqs of a mission (eg)

; file init.sqs
~1 ; delay until mission loaded
sold1 switchmove "mydrop"
exit
//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;
 };
};

};

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