User Tools

Site Tools


dragengine:modules:dragonscript:behavior_attachable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dragengine:modules:dragonscript:behavior_attachable [2025/05/11 10:19] dragonlorddragengine: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 parameters.+Update attachable.
  
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
-|deatch|empty string, ''dispose''|Detach element from attach slot if attached to an attach slot. If value is ''dispose'' element is disposed after detaching (even if not attached before) and BTResult.running returned to stop the behavior tree.| +|detach|empty string, ''dispose''|Detach element from attach slot if attached to an attach slot. If value is ''dispose'' disposed after detaching (even if not attached before) and returns BTResult.running to stop the behavior tree.| 
-|interactElement.assign|string|Assign look-at element to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string. Action fails if no element is looked at or interact element behavior is absent|+|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 ''interaction''.|
  
 This is an example of using this action: This is an example of using this action:
 <code xml> <code xml>
-<action name='attachable.set'>+<action name='attachable.update'>
   <parameter name='detach'>dispose</parameter>   <parameter name='detach'>dispose</parameter>
 </action> </action>
Line 60: Line 62:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |attached|''true'', ''false''|Element is attached to an attach slot or not| |attached|''true'', ''false''|Element is attached to an attach slot or not|
 +|interact.name|string|Name of interaction|
 +|interact.has|''true'', ''false''|Has attach slot and interaction with name ''interaction.name'' is present|
 +|interact.query|''true'', ''false''|Interact with attach slot and test result. Condition is true if attach slot is present, interaction with name ''interaction.name'' is present and interaction returns true. It is recommended to use here only interactions without side effects (hence query interactions).|
 +|interact.parameters|string|Optional parameters to use with ''interaction.query''.|
 |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 82: Line 88:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |attachable.attached|''true'', ''false''|Element is attached to an attach slot or not| |attachable.attached|''true'', ''false''|Element is attached to an attach slot or not|
 +|attachable.interact.name|string|Name of interaction|
 +|attachable.interact.has|''true'', ''false''|Has attach slot and interaction with name ''interaction.name'' is present|
 +|attachable.interact.query|''true'', ''false''|Interact with attach slot and test result. Condition is true if attach slot is present, interaction with name ''interaction.name'' is present and interaction returns true. It is recommended to use here only interactions without side effects (hence query interactions).|
 +|attachable.interact.parameters|string|Optional parameters to use with ''interaction.query''.|
  
 This is an example of using this condition: This is an example of using this condition:
dragengine/modules/dragonscript/behavior_attachable.1746958771.txt.gz · Last modified: 2025/05/11 10:19 by dragonlord