Idle Animations: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(New page: In Idle State, our AI can randomly choose between any number of idle animations. The list of possible idle anims is stored in the AI's def file and can easily be overridden in the editor. ...)
 
No edit summary
Line 1: Line 1:
In Idle State, our AI can randomly choose between any number of idle animations. The list of possible idle anims is stored in the AI's def file and can easily be overridden in the editor. The animation is played on the '''ANIMCHANNEL_TORSO'''.
In Idle State, our AI can randomly choose between any number of idle animations. The list of possible idle anims is stored in the AI's [[DEF]] file and can easily be overridden in the editor. The animation is played on the '''ANIMCHANNEL_TORSO'''. Take a look at '''tdm_ai_base.def''':


  "idle_animations"          "Torso_Itch,Torso_SniffArm,Torso_Cough"
  "idle_animations"          "Torso_Itch,Torso_SniffArm,Torso_Cough"

Revision as of 12:08, 8 November 2007

In Idle State, our AI can randomly choose between any number of idle animations. The list of possible idle anims is stored in the AI's DEF file and can easily be overridden in the editor. The animation is played on the ANIMCHANNEL_TORSO. Take a look at tdm_ai_base.def:

"idle_animations"           "Torso_Itch,Torso_SniffArm,Torso_Cough"
"idle_animations_interval"  "25" // seconds

The animation list is comma- or space-separated and can be any length. Note that the actual names (e.g. Torso_Itch) refer to the AnimState script functions defined in ai_darkmod_base.script, not the actual animation names.

The interval is measured in seconds and an uncertainty of plus/minus 20% is automatically applied by the SDK code. Set this to zero or negative values disables the idle animations on this AI.