This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_parametertable [2025/03/13 17:09] – dragonlord | dragengine:modules:dragonscript:behavior_parametertable [2025/05/05 22:25] (current) – [parameterTree.check] dragonlord | ||
---|---|---|---|
Line 24: | Line 24: | ||
This behavior has no events. | This behavior has no events. | ||
+ | |||
+ | ====== Behavior Tree Actions ====== | ||
+ | |||
+ | This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== parameterTree.set ===== | ||
+ | |||
+ | Set one or more parameter tree parameters. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |name|string|Name of parameter to manipulate| | ||
+ | |value|integer|Assign value to parameter| | ||
+ | |value.increment|integer|Increment parameter by integer value. If parameter is not set 0 is used as current value| | ||
+ | |value.decrement|integer|Decrement parameter by integer value. If parameter is not set 0 is used as current value| | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== parameterTree.check ===== | ||
+ | |||
+ | Check one or more parameter tree parameters. Action succeeds if all parameter value matches their respective parameter tree parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a parameter tree parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |name|string|Name of parameter to test| | ||
+ | |value|integer|Value of parameter is integer value. If parameter is absent 0 is used as current value| | ||
+ | |value.not|integer|Value of parameter is not integer value. If parameter is absent 0 is used as current value| | ||
+ | |value.less|integer|Value of parameter is less than integer value. If parameter is absent 0 is used as current value| | ||
+ | |value.greater|integer|Value of parameter is greater than integer value. If parameter is absent 0 is used as current value| | ||
+ | |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: | ||
+ | <code xml> | ||
+ | < | ||
+ | <action name=' | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <!-- actions here run only if parameter tree parameter value is less than 3 --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== parameterTree.check ===== | ||
+ | |||
+ | Check one or more parameter tree parameters. Conditions returns true if all parameter value match their respective parameter tree parameter. This condition is typically used to run an action or sequence of actions as long as parameter tree conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |parameterTree.name|string|Name of parameter to test| | ||
+ | |parameterTree.value|integer|Value of parameter is integer value. If parameter is absent 0 is used as current value| | ||
+ | |parameterTree.value.not|integer|Value of parameter is not integer value. If parameter is absent 0 is used as current value| | ||
+ | |parameterTree.value.less|integer|Value of parameter is less than integer value. If parameter is absent 0 is used as current value| | ||
+ | |parameterTree.value.greater|integer|Value of parameter is greater than integer value. If parameter is absent 0 is used as current value| | ||
+ | |||
+ | This is an example of using this condition: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== State Machine Actions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Conditions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Events ====== | ||
+ | |||
+ | This behavior sends no state machine events. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
Line 31: | Line 112: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | This behavior | + | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: |
+ | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
====== Persistency ====== | ====== Persistency ====== | ||
Line 67: | Line 149: | ||
< | < | ||
< | < | ||
+ | <!-- optional: use behavior tree with id instead of empty string --> | ||
+ | <string name=' | ||
+ | | ||
+ | <!-- optional: use state machine with id instead of empty string --> | ||
+ | <string name=' | ||
+ | | ||
<!-- set element properties. omit property prefix if used inside behavior tag --> | <!-- set element properties. omit property prefix if used inside behavior tag --> | ||
<string name=' | <string name=' |