This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_attachable [2025/05/02 22:13] – dragonlord | dragengine:modules:dragonscript:behavior_attachable [2025/05/13 14:03] (current) – dragonlord | ||
---|---|---|---|
Line 39: | Line 39: | ||
This behavior adds these behavior tree actions if behavior tree is present. | This behavior adds these behavior tree actions if behavior tree is present. | ||
- | ===== attachable.detach | + | ===== attachable.update |
- | Detach element from attach slot if attached to an attach slot. | + | Update attachable. |
^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
- | |dispose| | + | |detach|empty string, '' |
+ | |interactElement.assign|string|Assign attach slot element to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string. Action fails if not attached to an attach slot or interact element behavior is absent| | ||
+ | |interact|string|Interact with attach slot. If element is absent action fails. Runs interaction with name value. If interaction with name value is absent fails action. If interaction returns false fails action. Otherwise action succeeds.| | ||
+ | |interact.parameters|string|Optional parameters to use with '' | ||
This is an example of using this action: | This is an example of using this action: | ||
<code xml> | <code xml> | ||
- | <action name=' | + | <action name=' |
- | < | + | < |
</ | </ | ||
</ | </ | ||
Line 59: | Line 62: | ||
^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
|attached|'' | |attached|'' | ||
+ | |interact.name|string|Name of interaction| | ||
+ | |interact.has|'' | ||
+ | |interact.query|'' | ||
+ | |interact.parameters|string|Optional parameters to use with '' | ||
+ | |wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled| | ||
This is an example of using this action: | This is an example of using this action: | ||
Line 80: | Line 88: | ||
^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
|attachable.attached|'' | |attachable.attached|'' | ||
+ | |attachable.interact.name|string|Name of interaction| | ||
+ | |attachable.interact.has|'' | ||
+ | |attachable.interact.query|'' | ||
+ | |attachable.interact.parameters|string|Optional parameters to use with '' | ||
This is an example of using this condition: | This is an example of using this condition: | ||
Line 99: | Line 111: | ||
====== State Machine Events ====== | ====== State Machine Events ====== | ||
- | This behavior sends these state machine events.'' | + | This behavior sends these state machine events. |
===== attachable.attached ===== | ===== attachable.attached ===== |