Start Page » DragonScript Scripting Language » Behavior Elements: Quick and Easy Development » 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.
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 have the prefix convoCoordSystem.
or convoCoordSystem({id}).
if id is not empty.
Set name of conversation coordinate system. Name has to be unique in the game world the element is added to.
convoCoordSystem.name
or convoCoordSystem({id}).name
<string name='convoCoordSystem(body).name'>target1</string>
Set position relative to behavior element.
convoCoordSystem.position
or convoCoordSystem({id}).position
<vector name='convoCoordSystem.position' x='0' y='0' z='0.1'/>
Set orientation relative to behavior element.
convoCoordSystem.orientation
or convoCoordSystem({id}).orientation
<vector name='convoCoordSystem.orientation' x='30' y='0' z='0'/>
This behavior has no events.
This behavior requires no other behaviors.
This behavior does not support optional behaviors.
This behavior does require the element class to be persistable (setPersistable).
Since DragonScript Module Version 1.0
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
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>