Gem-Editor/Tips & Tricks/Scripting animations

This page describes the procedure of animation usability.For general information about animations see: AnimationFor a list of animation files from Men of War see: List of animation files

General information
Use of animations is a common way of creating simple motion routines in all kinds of application, especially in video games. Beside the micro-physics engines it is the only chance to include dynamic object behavior. Each animation can only apply to its own appointment (ie. human or vehicle). A fusion of both examples in one animation is impossible or it would lead to unwished results. Even if the animation method is used in most of todays video games it is a very limited and a few obsolete one, as the object cannot react on external environment by itself without a large ammount of utilisation of memory.

Usability
Men of War uses animation for loading static object adaption on any kind of influences. Whenever a human moves on the battlefield or a tank rotates its turret, animations are used to for visualization. In fact, they to not have any influence on the game mechanics. The easiest way of testing an animation in game is to assign it to a target unit in the editor. This can be done as follows:
 * 1) Place an entity on the map which is able to execute the animation you want it to
 * 2) Get an attibute for identification (ie. MID or TAG)
 * 3) Switch to mission editor  and select the triggers sub-menu
 * 4) Create a new trigger with a name of your choice
 * 5) Fill in a condition or leave it out to make the actor execute the action directly
 * 6) Add a new item to commands list where you select the item called   from folder
 * 7) Define the command with the missing entries as follows:
 * Selector Define what entity or human will execute the animation (ie. by MID or TAG)
 * Drop Define what the actor should stop when beginning with the action
 * Collage Write down the name of the animation file(s) to be executed (to be selected from this list)
 * Speed The speed factor which is used during execution; This can be any natural number ($$0 < Speed$$) where  is the standard speed
 * Cicledelay The delay between the end and the beginning of a cicle (in seconds)
 * Delay The delay between the different animations within one cicle (in seconds)
 * Total time ?
 * Flags Select one or two of the available flags:
 * Loop Repeat the collage when finished periodically
 * Random If you entered more than one animation file this option will foce a random execution order