Table of Contents

,

Start Page » DragonScript Scripting Language » Behavior Elements: Quick and Easy Development » ECBehaviorConvoCoordSystem

ECBehaviorConvoCoordSystem

Behavior element behavior adding conversation coordinate support.

Instance adds a ElementConvoCoordSystem to the game world the element is added to. These can be added to conversation playbacks as targets for actions. Creates a ECBehaviorConvoCoordSystem which returns the position relative to the element if queried.

Instance Counts

This behavior can be used multiple times on an element to add multiple ECBehaviorConvoCoordSystem to mainpulate. Use the behavior identifier to tell them apart.

Element Class Properties

Element class properties have the prefix convoCoordSystem. or convoCoordSystem({id}). if id is not empty.

name

Set name of conversation coordinate system. Name has to be unique in the game world the element is added to.

position

Set position relative to behavior element.

orientation

Set orientation relative to behavior element.

Events

This behavior has no events.

Required Behaviors

This behavior requires no other behaviors.

Optional Behaviors

This behavior does not support optional behaviors.

Persistency

This behavior does require the element class to be persistable (setPersistable).

API Documentation

ECBehaviorConvoCoordSystem.

Since DragonScript Module Version 1.0

Use Cases

Element Class Example

This example defines an element which contains a conversation coordinate system.

class MyElement extends BehaviorElementClass
  public var ECBehaviorConvoCoordSystem convoCoordSystem
  func new()
    convoCoordSystem = ECBehaviorConvoCoordSystem.new(this)
    convoCoordSystem.getPosition().setVector(Vector.new(0, 0, 0.3))
  end
end

Behavior Factory

Using element class supporting adding behaviors the behavior can be added like this:

<?xml version='1.0' encoding='UTF-8'?>
<elementClass name='MyClass' class='GenericBehaviorElement'>
  <behavior type='ECBehaviorConvoCoordSystem'>
    <!-- set element properties. omit property prefix if used inside behavior tag -->
    <string name='.name'>target1</string>
  </behavior>
 
  <!-- for adding multiple behaviors use unique identifiers -->
  <behavior type='ECBehaviorConvoCoordSystem' id='second'>
    ...
  </behavior>
</elementClass>

Live Examples