User Tools

Site Tools


dragengine:modules:dragonscript:behavior_attachable_anchorelement

ECABehaviorAnchorElement

Attachable behavior element behavior adding anchor element support.

Anchoring elements allows to locate elements in a GameWorld using a unique name set by the mapper. This is useful for game commands send by conversations scripts.

This behavior is similar to ECBehaviorAnchorElement but can be attached if required. This is especially useful in editing worlds to add an anchor to any element without needing to add \ref ECBehaviorAnchorElement to the element class itself.

Upon adding behavior to element the element class properties mentioned below are evaluated if present

Instance Counts

This behavior can be used only once on an element.

Element Class Properties

Element class properties have no prefix.

anchorID

Sets the anchor name or empty string to not anchor.

  • Full name: “anchorID”
  • Type: string
  • Default Value: empty string

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 not require persistency.

API Documentation

ECABehaviorAnchorElement.

Since DragonScript Module Version 1.31

Use Cases

  • Reference elements in world editor using unique the anchor name.
  • Allow game scripts to locate an element in the game world using the anchor name.

Live Examples

You could leave a comment if you were logged in.
dragengine/modules/dragonscript/behavior_attachable_anchorelement.txt · Last modified: 2026/03/20 17:53 by dragonlord