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:20] – dragonlorddragengine:modules:dragonscript:behavior_interactionelement [2026/11/20 16:24] (current) – [interactionElement.check] dragonlord
Line 33: Line 33:
 ===== interactionElement.update ===== ===== interactionElement.update =====
  
-Update interaction element.+Update interaction element. Parameters are processed in this order: 
 +  * assign 
 +  * interact 
 +  * runEvent 
 +  * clear
  
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
Line 39: Line 43:
 |interact.parameters|string|Optional parameters 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|+|runEvent|string|Run named event on all [[behavior_statemachine|ECBehaviorStateMachine]] instances of the stored interaction element with the element of this behavior as event parameter. Action fails if no element is stored.| 
 +|clear|-|Clear stored interaction element|
  
 This is an example of using this action: This is an example of using this action:
Line 54: Line 59:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |set|''true'', ''false''|Interaction element is stored| |set|''true'', ''false''|Interaction element is stored|
 +|flags.set|string|Stored interaction element has [[behavior_flags|ECBehaviorFlags]] with named flag set. Fails if no element is stored.|
 +|flags.clear|string|Stored interaction element has [[behavior_flags|ECBehaviorFlags]] with named flag cleared. Fails if no element is stored.|
 |interact.name|string|Name of interaction| |interact.name|string|Name of interaction|
 |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.parameters|string|Optional parameters to use with ''interaction.query''.| |interact.parameters|string|Optional parameters to use with ''interaction.query''.|
 +|matches|<target>|<WRAP>Stored interaction element matches target:
 +  * ''eventParameter'': State machine content event parameter
 +</WRAP>|
 +|matches.not|<target>|<WRAP>Stored interaction element does not match target:
 +  * ''eventParameter'': State machine content event parameter
 +</WRAP>|
 |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 81: Line 94:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |interactionElement.set|''true'', ''false''|Interaction element is stored| |interactionElement.set|''true'', ''false''|Interaction element is stored|
 +|interactionElement.flags.set|string|Stored interaction element has [[behavior_flags|ECBehaviorFlags]] with named flag set.|
 +|interactionElement.flags.clear|string|Stored interaction element has [[behavior_flags|ECBehaviorFlags]] with named flag cleared.|
 |interactionElement.interact.name|string|Name of interaction| |interactionElement.interact.name|string|Name of interaction|
 |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.parameters|string|Optional parameters to use with ''interaction.query''| |interactionElement.interact.parameters|string|Optional parameters to use with ''interaction.query''|
 +|interactionElement.matches|<target>|<WRAP>Stored interaction element matches target:
 +  * ''eventParameter'': State machine content event parameter
 +</WRAP>|
 +|interactionElement.matches.not|<target>|<WRAP>Stored interaction element does not match target:
 +  * ''eventParameter'': State machine content event parameter
 +</WRAP>|
  
 This is an example of using this condition: This is an example of using this condition:
dragengine/modules/dragonscript/behavior_interactionelement.1746976840.txt.gz · Last modified: by dragonlord