User Tools

Site Tools


dragengine:modules:dragonscript:behavior_rideon

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_rideon [2025/05/02 21:50] – [Optional Behaviors] dragonlorddragengine:modules:dragonscript:behavior_rideon [2025/05/13 14:02] (current) dragonlord
Line 32: Line 32:
  
 This behavior adds these behavior tree actions if behavior tree is present. This behavior adds these behavior tree actions if behavior tree is present.
 +
 +===== rideOn.update =====
 +
 +Update ride on.
 +
 +^Parameter^Value^Description^
 +|interact|string|Interact with ridable element. 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''.|
 +|interactElement.assign|string|Assign ridable to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string. Action fails if no element is ridable or interact element behavior is absent|
 +
 +This is an example of using this action:
 +<code xml>
 +<action name='lookAt.update'>
 +  <parameter name='interactElement.assign'/>
 +</action>
 +</code>
  
 ===== rideOn.check ===== ===== rideOn.check =====
Line 39: Line 55:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |ridable|''true'', ''false''|Riding on an element| |ridable|''true'', ''false''|Riding on an element|
 +|interact.name|string|Name of interaction|
 +|interact.has|''true'', ''false''|Has ridable and interaction with name ''interaction.name'' is present|
 +|interact.query|''true'', ''false''|Interact with ridable and test result. Condition is true if ridable 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|
  
 This is an example of using this action: This is an example of using this action:
Line 60: Line 81:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |rideOn.ridable|''true'', ''false''|Riding on an element| |rideOn.ridable|''true'', ''false''|Riding on an element|
 +|rideOn.interact.name|string|Name of interaction|
 +|rideOn.interact.has|''true'', ''false''|Has ridable and interaction with name ''interaction.name'' is present|
 +|rideOn.interact.query|''true'', ''false''|Interact with ridable and test result. Condition is true if ridable 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).|
 +|rideOn.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:
Line 68: Line 93:
 </action> </action>
 </code> </code>
 +
 +====== State Machine Actions ======
 +
 +Same as [[#behavior_tree_actions|Behavior Tree Actions]].
 +
 +====== State Machine Conditions ======
 +
 +Same as [[#behavior_tree_conditions|Behavior Tree Conditions]].
 +
 +====== State Machine Events ======
 +
 +This behavior sends these state machine events.
 +
 +===== rideOn.begin =====
 +
 +Element is riding on a ridable while previously it did not ride on a ridable.
 +
 +===== rideOn.end =====
 +
 +Element is not riding on a ridable while previously it has been riding on a ridable.
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
dragengine/modules/dragonscript/behavior_rideon.1746222626.txt.gz · Last modified: 2025/05/02 21:50 by dragonlord