User Tools

Site Tools


democap:behavior_ecbcapturedanimations

ECBCapturedAnimations

Behavior adding captured animation support to owner element. This is the main recording feature for objects. Multiple animations can be recorded layered ontop of each other.

Instance Counts

This behavior can be used only once on an element.

Element Class Properties

Element class properties have the prefix capturedAnimations..

animationName

Name for newly created animations.

  • Full name: myBehavior.animationName
  • Type: string
  • Default Value: Object
  • Example (*.deeclass)
    <string name='myBehavior.animationName'>Object</string>

Events

recordChanged

Record state changed.

Conversation Commands

This behavior adds no conversation commands.

Conversation Conditions

This behavior adds no conversation conditions.

Behavior Tree Actions

This behavior adds no behavior tree actions.

Behavior Tree Conditions

This behavior adds no behavior tree conditions.

Required Behaviors

Optional Behaviors

API Documentation

Since DEMoCap Version 1.3

Use Cases

  • Allow recording object.

Element Class Example

class MyElement extends BehaviorElementClass
  public var ECBehaviorComponent component
  public var ECBehaviorCollider collider
  public var ECBBehaviorGuiPanels guiPanels
  public var ECBCapturedAnimations myBehavior
  func new()
    component = ECBehaviorComponent.new(this, null)
    collider = ECBehaviorCollider.new(this, component)
    guiPanels = ECBBehaviorGuiPanels.new(this)
    myBehavior = ECBCapturedAnimations.new(this, guiPanels, component, collider)
  end
end

Behavior Factory

Using element class supporting adding behaviors the behavior can be added like this (again create an example which creates a valid element class):

<?xml version='1.0' encoding='UTF-8'?>
<elementClass name='MyClass' class='GenericBehaviorElement'>
  <behavior type='ECBehaviorComponent'/>
  <behavior type='ECBehaviorCollider'/>
  <behavior type='ECBBehaviorGuiPanels'/>
 
  <behavior type='ECBCapturedAnimations'>
    <!-- optional: use component with id instead of empty string -->
    <string name='component'>second</string>
 
    <!-- set element properties. omit property prefix if used inside behavior tag -->
    <string name='.animationName'>Object</string>
  </behavior>
</elementClass>

Live Examples

You could leave a comment if you were logged in.
democap/behavior_ecbcapturedanimations.txt · Last modified: 2025/03/22 18:23 by dragonlord