Frame commands: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(add ffirst stab)
 
(more)
Line 44: Line 44:
|Plays the referenced sound shader on the second voice sound channel.
|Plays the referenced sound shader on the second voice sound channel.
|<code>frame 1  sound_voice2 monster_boss_vagary_attack1</code>
|<code>frame 1  sound_voice2 monster_boss_vagary_attack1</code>
|-
|sound_body
|Plays the referenced sound shader on the body sound channel.
|<code>frame 50  sound_body snd_footstep</code>
|-
|sound_body2
|Plays the referenced sound shader on the second body sound channel.
|<code>frame 92  sound_body2 snd_footstep</code>
|-
|sound_body3
|Plays the referenced sound shader on the third body sound channel.
|<code>Not used so far, but similiar to sound_body</code>
|-
|sound_weapon
|Plays the referenced sound shader on the weapon sound channel.
|<code>frame 16  sound_weapon snd_drawsword</code>
|-
|sound_global
|Plays the referenced sound shader on the global sound channel.
|<code>Not used so far, but similiar to sound_body</code>
|-
|sound_item
|Plays the referenced sound shader on the item sound channel.
|<code>Not used so far, but similiar to sound_body</code>
|-
|sound_chatter
|Plays the referenced sound shader on the chatter sound channel.
|<code>frame 57  sound_chatter snd_alert_idle</code>
|-
|skin
|Sets a new skin for the model. Skin name is optional, if left off, no skin (e.g. the default skin) is used.
|<code>frame 1  skin tdm_burnt_flesh</code>
|-
|fx
|Plays the named fx (effect combining particle, sound and light).
|<code>Not used so far</code>
|-
|trigger
|Triggers the given target (e.g. activates it).
|<code>Not used so far</code>
|-
|triggerSmokeParticle
|Triggers the named particle (which can be everything, not just smoke).
|<code>frame 1  triggerSmokeParticle smokestack</code>
|-
|melee
|Starts melee action?
|<code>frame 9  melee melee_elemental_fire</code>
|-
|direct_damage
|Does direct damage to the target entity.
|<code>Not used so far.</code>


|}
|}
Line 59: Line 124:
|-
|-
|attach
|attach
|Spawns an entity of the given class and attaches it with the given attach name on the given attach position.
|Spawns an entity of the given class and attaches it with the given attach name on the given attach position. '''TDM v1.02 and later.'''
|<code>frame 42  attach  atdm:prop_single_card  card  hand_r</code>
|<code>frame 42  attach  atdm:prop_single_card  card  hand_r</code>


|-
|-
|detach
|destroy
|Detach and destroy the entity at the named attachment.
|Detach and destroy the entity at the named attachment. '''TDM v1.02 and later.'''
|<code>frame 42  detach card</code>
|<code>frame 42  destroy card</code>


|-
|-
|drop
|drop
|Detach and drop to world the entity at the named attachment.
|Detach and drop to world the entity at the named attachment. '''TDM v1.02 and later.'''
|<code>frame 42  drop  bucket</code>
|<code>frame 42  drop  bucket</code>


|-
|-
|pickup
|pickup
|Find the entity with the given name, then attach it as the named attachment at the given position.
|Find the entity with the given name, then attach it as the named attachment at the given position. '''TDM v1.02 and later.'''
|<code>frame 42  pickup  atdm_water_bucket_01 bucket hand_l</code>
|<code>frame 42  pickup  atdm_water_bucket_01 bucket hand_l</code>



Revision as of 19:22, 12 April 2010

Introduction

Each animation can have commands attached. These are either global (they influence the entire animation), or per-frame (they do something at the frame with the given number).

Apart from the default D3 frame commands, the darkmod team has added a few new, useful frame commands. This page tries to describe them all.


Default Doom3 frame commands

Keyword Description Example
call calls a global script function frame 1 call overrideLegs
object_call calls a script object function frame 1 object_call ArrowInvisible
event Calls an event function Unused so far
sound Plays the referenced sound shader on the general sound channel. frame 12 sound readable_page_turn
sound_voice Plays the referenced sound shader on the voice sound channel. frame 23 sound_voice snd_sight
sound_voice2 Plays the referenced sound shader on the second voice sound channel. frame 1 sound_voice2 monster_boss_vagary_attack1
sound_body Plays the referenced sound shader on the body sound channel. frame 50 sound_body snd_footstep
sound_body2 Plays the referenced sound shader on the second body sound channel. frame 92 sound_body2 snd_footstep
sound_body3 Plays the referenced sound shader on the third body sound channel. Not used so far, but similiar to sound_body
sound_weapon Plays the referenced sound shader on the weapon sound channel. frame 16 sound_weapon snd_drawsword
sound_global Plays the referenced sound shader on the global sound channel. Not used so far, but similiar to sound_body
sound_item Plays the referenced sound shader on the item sound channel. Not used so far, but similiar to sound_body
sound_chatter Plays the referenced sound shader on the chatter sound channel. frame 57 sound_chatter snd_alert_idle
skin Sets a new skin for the model. Skin name is optional, if left off, no skin (e.g. the default skin) is used. frame 1 skin tdm_burnt_flesh
fx Plays the named fx (effect combining particle, sound and light). Not used so far
trigger Triggers the given target (e.g. activates it). Not used so far
triggerSmokeParticle Triggers the named particle (which can be everything, not just smoke). frame 1 triggerSmokeParticle smokestack
melee Starts melee action? frame 9 melee melee_elemental_fire
direct_damage Does direct damage to the target entity. Not used so far.


TDM frame commands

Keyword Description Example
attach Spawns an entity of the given class and attaches it with the given attach name on the given attach position. TDM v1.02 and later. frame 42 attach atdm:prop_single_card card hand_r
destroy Detach and destroy the entity at the named attachment. TDM v1.02 and later. frame 42 destroy card
drop Detach and drop to world the entity at the named attachment. TDM v1.02 and later. frame 42 drop bucket
pickup Find the entity with the given name, then attach it as the named attachment at the given position. TDM v1.02 and later. frame 42 pickup atdm_water_bucket_01 bucket hand_l