User Tools

Site Tools


dragengine:modules:dragonscript:behavior_grabber

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_grabber [2025/05/11 11:09] dragonlorddragengine:modules:dragonscript:behavior_grabber [2025/05/13 14:05] (current) dragonlord
Line 88: Line 88:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |enabled|''true'', ''false''|Grabber is enabled| |enabled|''true'', ''false''|Grabber is enabled|
-|release| |Release grab spot if grabbing one.| 
-|interactElement.assign|string|Assign grab spot element to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string. Action fails if no element is grabbed or interact element behavior is absent| 
  
 This is an example of using this action: This is an example of using this action:
Line 95: Line 93:
 <action name='grabber.set'> <action name='grabber.set'>
   <parameter name='enabled'>true</parameter>   <parameter name='enabled'>true</parameter>
 +</action>
 +</code>
 +
 +===== grabber.update =====
 +
 +Update grabber.
 +
 +^Parameter^Value^Description^
 +|release| |Release grab spot if grabbing one.|
 +|interactElement.assign|string|Assign grab spot element to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string. Action fails if no element is grabbed or interact element behavior is absent|
 +|interact|string|Interact with grab spot. 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:
 +<code xml>
 +<action name='grabber.update'>
 +  <parameter name='release'/>
 </action> </action>
 </code> </code>
Line 105: Line 120:
 |enabled|''true'', ''false''|Grabber is enabled| |enabled|''true'', ''false''|Grabber is enabled|
 |grabbing|''true'', ''false''|Grabber is grabbing a grab spot| |grabbing|''true'', ''false''|Grabber is grabbing a grab spot|
 +|interact.name|string|Name of interaction|
 +|interact.has|''true'', ''false''|Has grab spot and interaction with name ''interaction.name'' is present|
 +|interact.query|''true'', ''false''|Interact with grab spot and test result. Condition is true if grab spot 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 128: Line 147:
 |grabber.enabled|''true'', ''false''|Grabber is enabled| |grabber.enabled|''true'', ''false''|Grabber is enabled|
 |grabber.grabbing|''true'', ''false''|Grabber is grabbing a grab spot| |grabber.grabbing|''true'', ''false''|Grabber is grabbing a grab spot|
 +|grabber.interact.name|string|Name of interaction|
 +|grabber.interact.has|''true'', ''false''|Has grab spot and interaction with name ''interaction.name'' is present|
 +|grabber.interact.query|''true'', ''false''|Interact with grab spot and test result. Condition is true if grab spot 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).|
 +|grabber.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_grabber.1746961743.txt.gz · Last modified: 2025/05/11 11:09 by dragonlord