This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dragengine:modules:dragonscript:behavior_interactionelement [2025/05/11 15:11] – [Behavior Factory] dragonlord | dragengine: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. |
| + | * assign | ||
| + | * interact | ||
| + | * runEvent | ||
| + | * clear | ||
| ^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 | + | |interact.parameters|string|Optional |
| |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|'' | |set|'' | ||
| + | |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|'' | |interact.has|'' | ||
| |interact.query|'' | |interact.query|'' | ||
| - | |interact.parameter|string|Optional | + | |interact.parameters|string|Optional |
| + | |matches|< | ||
| + | * '' | ||
| + | </ | ||
| + | |matches.not|< | ||
| + | * '' | ||
| + | </ | ||
| |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|'' | |interactionElement.set|'' | ||
| + | |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|'' | |interactionElement.interact.has|'' | ||
| |interactionElement.interact.query|'' | |interactionElement.interact.query|'' | ||
| - | |interactionElement.interact.parameter|string|Optional | + | |interactionElement.interact.parameters|string|Optional |
| + | |interactionElement.matches|< | ||
| + | * '' | ||
| + | </ | ||
| + | |interactionElement.matches.not|< | ||
| + | * '' | ||
| + | </ | ||
| This is an example of using this condition: | This is an example of using this condition: | ||