User Tools

Site Tools


dragengine:modules:dragonscript:behavior_grabspot

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_grabspot [2025/05/11 11:07] dragonlorddragengine:modules:dragonscript:behavior_grabspot [2025/05/13 14:06] (current) dragonlord
Line 117: Line 117:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |enabled|''true'', ''false''|Grab spot is enabled| |enabled|''true'', ''false''|Grab spot is enabled|
-|release| |Release grabber if one is grabbing the grab spot.| 
-|interactElement.assign|string|Assign grabber element to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string. Action fails if no element is grabbing or interact element behavior is absent| 
  
 This is an example of using this action: This is an example of using this action:
Line 124: Line 122:
 <action name='grabSpot.set'> <action name='grabSpot.set'>
   <parameter name='enabled'>true</parameter>   <parameter name='enabled'>true</parameter>
 +</action>
 +</code>
 +
 +===== grabSpot.update =====
 +
 +Update grab spot.
 +
 +^Parameter^Value^Description^
 +|release| |Release grabber if one is grabbing the grab spot.|
 +|interactElement.assign|string|Assign grabber element to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string. Action fails if no element is grabbing or interact element behavior is absent|
 +|interact|string|Interact with grabber. 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='grabSpot.update'>
 +  <parameter name='release'/>
 </action> </action>
 </code> </code>
Line 134: Line 149:
 |enabled|''true'', ''false''|Grab spot is enabled| |enabled|''true'', ''false''|Grab spot is enabled|
 |grabbed|''true'', ''false''|Grab spot is grabbed by a grabber| |grabbed|''true'', ''false''|Grab spot is grabbed by a grabber|
 +|interact.name|string|Name of interaction|
 +|interact.has|''true'', ''false''|Has grabber and interaction with name ''interaction.name'' is present|
 +|interact.query|''true'', ''false''|Interact with grabber and test result. Condition is true if grabber 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 157: Line 176:
 |grabSpot.enabled|''true'', ''false''|Grab spot is enabled| |grabSpot.enabled|''true'', ''false''|Grab spot is enabled|
 |grabSpot.grabbed|''true'', ''false''|Grab spot is grabbed by a grabber| |grabSpot.grabbed|''true'', ''false''|Grab spot is grabbed by a grabber|
 +|grabSpot.interact.name|string|Name of interaction|
 +|grabSpot.interact.has|''true'', ''false''|Has grabber and interaction with name ''interaction.name'' is present|
 +|grabSpot.interact.query|''true'', ''false''|Interact with grabber and test result. Condition is true if grabber 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).|
 +|grabSpot.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_grabspot.1746961679.txt.gz · Last modified: 2025/05/11 11:07 by dragonlord