User Tools

Site Tools


dragengine:modules:dragonscript:behavior_interactionelement

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_interactionelement [2025/05/11 15:09] dragonlorddragengine:modules:dragonscript:behavior_interactionelement [2025/05/11 15:20] (current) dragonlord
Line 37: Line 37:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |interact|string|Interact with stored 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|string|Interact with stored 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.parameter|string|Optional parameter to use with ''interaction''.|+|interact.parameters|string|Optional parameters to use with ''interaction''.|
 |assign|string|Assign stored interaction element to another ECBehaviorInteractionElement with identifier value| |assign|string|Assign stored interaction element to another ECBehaviorInteractionElement with identifier value|
 |clear|string|Clear stored interaction element| |clear|string|Clear stored interaction element|
Line 57: Line 57:
 |interact.has|''true'', ''false''|Interaction element is stored and interaction with name ''interaction.name'' is present| |interact.has|''true'', ''false''|Interaction element is stored and interaction with name ''interaction.name'' is present|
 |interact.query|''true'', ''false''|Interact with stored element and test result. Condition is true if interaction element is stored, 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.query|''true'', ''false''|Interact with stored element and test result. Condition is true if interaction element is stored, 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.parameter|string|Optional parameter to use with ''interaction.query''.|+|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 84: Line 84:
 |interactionElement.interact.has|''true'', ''false''|Interaction element is stored and interaction with name ''interaction.name'' is present| |interactionElement.interact.has|''true'', ''false''|Interaction element is stored and interaction with name ''interaction.name'' is present|
 |interactionElement.interact.query|''true'', ''false''|Interact with stored element and test result. Condition is true if interaction element is stored, 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).| |interactionElement.interact.query|''true'', ''false''|Interact with stored element and test result. Condition is true if interaction element is stored, 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).|
-|interactionElement.interact.parameter|string|Optional parameter to use with ''interaction.query''|+|interactionElement.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 151: Line 151:
 <?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
 <elementClass name='MyClass' class='GenericBehaviorElement'> <elementClass name='MyClass' class='GenericBehaviorElement'>
-  <behavior type='ECBehaviorInteractionElement'/>+  <behavior type='ECBehaviorInteractionElement'
 +    <!-- optional: add behavior trees. default adds all behavior trees. --> 
 +    <list name='behaviorTrees'> 
 +      <string/> <!-- add behavior with empty identifier --> 
 +      <string>default</string> <!-- add behavior with 'default' identifier --> 
 +    </list> 
 +     
 +    <!-- optional: add state machines. default adds all state machines. --> 
 +    <list name='stateMachines'> 
 +      <string/> <!-- add behavior with empty identifier --> 
 +      <string>default</string> <!-- add behavior with 'default' identifier --> 
 +    </list> 
 +  </behavior>
      
   <!-- for adding multiple behaviors use unique identifiers -->   <!-- for adding multiple behaviors use unique identifiers -->
dragengine/modules/dragonscript/behavior_interactionelement.1746976166.txt.gz · Last modified: 2025/05/11 15:09 by dragonlord