{{tag>dragonscript behavior}}
[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[abstractions#behavior_elementsquick_and_easy_development|Behavior Elements: Quick and Easy Development]] >> **ECBehaviorConvoCoordSystem**
* [[behaviors_use_cases|Behaviors Explained: By Use-Case]]
* [[behaviors_a_to_z|Behaviors Explained: From A to Z]]
====== 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.
* Full name: ''convoCoordSystem.name'' or ''convoCoordSystem({id}).name''
* Type: string
* Default Value: empty string
* Example (*.deeclass) target1
===== position =====
Set position relative to behavior element.
* Full name: ''convoCoordSystem.position'' or ''convoCoordSystem({id}).position''
* Type: 3-component float vector
* Default Value: (0,0,0)
* Example (*.deeclass)
===== orientation =====
Set orientation relative to behavior element.
* Full name: ''convoCoordSystem.orientation'' or ''convoCoordSystem({id}).orientation''
* Type: 3-component float vector
* Default Value: (0,0,0)
* Example (*.deeclass)
====== 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 ======
#@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorConvoCoordSystem.html,ECBehaviorConvoCoordSystem~@#.
Since DragonScript Module Version ''1.0''
====== Use Cases ======
* Allow actors to look at specific position on element during conversations.
* Allow game scripts to align elements against a known coordinate system on the element.
====== 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:
target1
...
====== Live Examples ======
* [[https://github.com/LordOfDragons/deexamples|DEExamples Repository]]