Creating Animations: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 9: Line 9:


This document describes howto add your own animation to a ''mission''.
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
  Note that switchMove and Playmove commands DO NOT WORK in the init field of a mission sqm
Line 22: Line 21:
to do so:
to do so:


Therefore, in the intro.sqs of a mission (eg)
  ;init.sqs eg
 
  ; file init.sqs
  ~1 ; delay until mission loaded
  ~1 ; delay until mission loaded
  sold1 switchmove "mydrop"
  PoorSoldier switchmove "mydrop"
  exit
  exit
//mission sqm
class Mission
{
  addOns[]={MyPboName,,,,,


  //config.cpp
  //config.cpp
Line 43: Line 45:
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.
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 CfgMovesMaleSdr // adds to existing CfgMovesMaleSdr in Anims.pbo
{
class States
  {
  {
   class AdthPercMstpSlowWrflDnon_1; // some pre-declared animation
   class States
  class mydrop: AdthPercMstpSlowWrflDnon_1
   {
   {
   file = "\MyPbo\SomeWhere\MyRtmFile"; // (.rtm is assumed)
   class AdthPercMstpSlowWrflDnon_1; // some pre-declared animation
  speed = 0.58;
  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:
Note that:

Revision as of 09:56, 13 March 2009

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