This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dragengine:modules:dragonscript:behavior_behaviortree [2026/10/11 01:34] – dragonlord | dragengine:modules:dragonscript:behavior_behaviortree [2026/10/11 15:05] (current) – dragonlord | ||
|---|---|---|---|
| Line 76: | Line 76: | ||
| This behavior adds these behavior tree actions. | This behavior adds these behavior tree actions. | ||
| + | |||
| + | ===== element.set ===== | ||
| + | |||
| + | Set owner element parameters. | ||
| + | |||
| + | ^Parameter^Value^Description^ | ||
| + | |visible|true, | ||
| + | |touchable|true, | ||
| + | |||
| + | This is an example of using this action to fully hide the owner element: | ||
| + | <code xml> | ||
| + | <action name=' | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== element.update ===== | ||
| + | |||
| + | Update owner element. | ||
| + | |||
| + | ^Parameter^Value^Description^ | ||
| + | |dispose| |Dispose of owner element. Make sure this is the last action run in a transition or state. Running actions afterwards can lead to problems.| | ||
| + | |log|string|Print a log message using Element.log() function.| | ||
| + | |||
| + | This is an example of using this action to dispose element: | ||
| + | <code xml> | ||
| + | <action name=' | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| ===== gameWorld ===== | ===== gameWorld ===== | ||
| - | Runs action from game world behavior [[gwbehavior_btsm|GWBehaviorBTSM]]. Game world behaviors can add behavior tree actions to GWBehaviorBTSM similar to how element class behaviors can add behavior tree actions to this behavior. This allows behavior trees to access actions specific to a game world. The action is run as if it has been added to this behavior. All parameters defined in the action are passed to the game world actionndition with the addition of the parameter '' | + | Runs action from game world behavior [[gwbehavior_btsm|GWBehaviorBTSM]]. Game world behaviors can add behavior tree actions to GWBehaviorBTSM similar to how element class behaviors can add behavior tree actions to this behavior. This allows behavior trees to access actions specific to a game world. The action is run as if it has been added to this behavior. All parameters defined in the action are passed to the game world actionndition with the addition of the parameter '' |
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| Line 97: | Line 129: | ||
| This behavior adds these behavior tree conditions. | This behavior adds these behavior tree conditions. | ||
| + | |||
| + | ===== element.check ===== | ||
| + | |||
| + | Evaluate owner element parameters. | ||
| + | |||
| + | ^Parameter^Value^Description^ | ||
| + | |element.visible|true, | ||
| + | |element.touchable|true, | ||
| + | |element.inGameWorld|true, | ||
| + | |element.hasParent|true, | ||
| + | |||
| + | This is an example of using this condition to check if the element is visible, touchable, in a game world and not parented to another element: | ||
| + | <code xml> | ||
| + | <action name=' | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| ===== gameWorld ===== | ===== gameWorld ===== | ||
| - | Evaluate condition from game world behavior [[gwbehavior_btsm|GWBehaviorBTSM]]. Game world behaviors can add behavior tree conditions to GWBehaviorBTSM similar to how element class behaviors can add behavior tree conditions to this behavior. This allows behavior trees to access conditions specific to a game world. The condition is evaluated as if it has been added to this behavior. All parameters defined in the condition are passed to the game world condition with the addition of the parameter '' | + | Evaluate condition from game world behavior [[gwbehavior_btsm|GWBehaviorBTSM]]. Game world behaviors can add behavior tree conditions to GWBehaviorBTSM similar to how element class behaviors can add behavior tree conditions to this behavior. This allows behavior trees to access conditions specific to a game world. The condition is evaluated as if it has been added to this behavior. All parameters defined in the condition are passed to the game world condition with the addition of the parameter '' |
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||