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/11 10:24] – old revision restored (2025/05/04 13:45) 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.set ===== | + | ===== attachable.update |
- | Set one or more attachable | + | Update |
^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
- | |interactElement.assign|string|Assign | + | |detach|empty string, '' |
+ | |interactElement.assign|string|Assign | ||
+ | |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=' |
- | < | + | < |
- | </action> | + | |
- | </ | + | |
- | + | ||
- | ===== attachable.detach ===== | + | |
- | + | ||
- | Detach element from attach slot if attached to an attach slot. | + | |
- | + | ||
- | ^Parameter^Value^Description^ | + | |
- | |dispose| |If present element is disposed after detaching, even if not attached before. Action returns BTResult.running to stop the behavior tree.| | + | |
- | + | ||
- | This is an example of using this action: | + | |
- | <code xml> | + | |
- | <action name=' | + | |
- | <parameter | + | |
</ | </ | ||
</ | </ | ||
Line 73: | 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| | |wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled| | ||
Line 95: | 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: |