User Tools

Site Tools


democap:behavior_ecbcopyobject

ECBCopyObject

Behavior adding support to copy object.

It is recommended to always add this behavior in an element class to allow cloning it.

Instance Counts

This behavior can be used only once on an element.

Element Class Properties

Element class properties have the prefix copyObject..

Events

This behavior has no events.

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

This behavior requires no other behaviors.

Optional Behaviors

This behavior does not support optional behaviors.

API Documentation

Since DEMoCap Version 1.3

Use Cases

  • Allow object to be cloned.

Element Class Example

class MyElement extends BehaviorElementClass
  public var ECBCopyObject copyObject
  func new()
    copyObject = ECBCopyObject.new(this)
  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='ECBCopyObject'/>
</elementClass>

Live Examples

You could leave a comment if you were logged in.
democap/behavior_ecbcopyobject.txt · Last modified: 2025/03/22 17:25 by dragonlord