This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_footsteps [2025/03/13 17:09] – dragonlord | dragengine:modules:dragonscript:behavior_footsteps [2025/05/06 13:03] (current) – [Behavior Factory] dragonlord | ||
---|---|---|---|
Line 36: | Line 36: | ||
Configuration changed. | Configuration changed. | ||
+ | |||
+ | ====== Behavior Tree Actions ====== | ||
+ | |||
+ | This behavior adds these behavior tree actions if behavior tree is present. | ||
+ | |||
+ | ===== footSteps.set ===== | ||
+ | |||
+ | Set one or more foot steps parameters. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |configuration|string|Set active configuration by identifier. Use empty string to clear| | ||
+ | |elapsed|float|Elapsed time in the current interval| | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== footSteps.check ===== | ||
+ | |||
+ | Check one or more foot steps parameters. Action succeeds if all parameter value matches their respective foot steps parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a foot steps parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |configuration|string|Active configuration identifier (empty string if none is active) matches string value| | ||
+ | |configuration.not|string|Active configuration identifier (empty string if none is active) does not match string value| | ||
+ | |configuration.starts|string|Active configuration identifier (empty string if none is active) starts with string value| | ||
+ | |configuration.starts.not|string|Active configuration identifier (empty string if none is active) does not start with string value| | ||
+ | |configuration.ends|string|Active configuration identifier (empty string if none is active) ends with string value| | ||
+ | |configuration.ends.not|string|Active configuration identifier (empty string if none is active) does not end with string value| | ||
+ | |configuration.contains|string|Active configuration identifier (empty string if none is active) contains string value| | ||
+ | |configuration.contains.not|string|Active configuration identifier (empty string if none is active) does not contain string value| | ||
+ | |elapsed.less|float|Elapsed time in the current interval is less then value seconds| | ||
+ | |elapsed.greater|float|Elapsed time in the current interval is greater then value seconds| | ||
+ | |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 configuration named " | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. | ||
+ | |||
+ | ===== footSteps.check ===== | ||
+ | |||
+ | Check one or more foot steps parameters. Conditions returns true if all parameter value match their respective foot steps parameter. This condition is typically used to run an action or sequence of actions as long as foot steps conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |footSteps.configuration|string|Active configuration identifier (empty string if none is active) matches string value| | ||
+ | |footSteps.configuration.not|string|Active configuration identifier (empty string if none is active) does not match string value| | ||
+ | |footSteps.configuration.starts|string|Active configuration identifier (empty string if none is active) starts with string value| | ||
+ | |footSteps.configuration.starts.not|string|Active configuration identifier (empty string if none is active) does not start with string value| | ||
+ | |footSteps.configuration.ends|string|Active configuration identifier (empty string if none is active) ends with string value| | ||
+ | |footSteps.configuration.ends.not|string|Active configuration identifier (empty string if none is active) does not end with string value| | ||
+ | |footSteps.configuration.contains|string|Active configuration identifier (empty string if none is active) contains string value| | ||
+ | |footSteps.configuration.contains.not|string|Active configuration identifier (empty string if none is active) does not contain string value| | ||
+ | |footSteps.elapsed.less|float|Elapsed time in the current interval is less then value seconds| | ||
+ | |footSteps.elapsed.greater|float|Elapsed time in the current interval is greater then value seconds| | ||
+ | |||
+ | 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 these state machine events. | ||
+ | |||
+ | ===== footSteps.configuration ===== | ||
+ | |||
+ | Foot steps configuration changed. | ||
+ | |||
+ | ===== footSteps.foorStep ===== | ||
+ | |||
+ | Foot step triggered. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
Line 43: | Line 137: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | This behavior | + | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: |
+ | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
====== Persistency ====== | ====== Persistency ====== | ||
Line 79: | Line 174: | ||
< | < | ||
< | < | ||
+ | <!-- optional: use actor animated with id instead of empty string --> | ||
+ | <string name=' | ||
+ | | ||
+ | <!-- set if update() is automatically called on postThink(). default is ' | ||
+ | <boolean name=' | ||
+ | | ||
+ | <!-- optional: use state machine with id instead of empty string --> | ||
+ | <string name=' | ||
+ | | ||
<!-- set if update() is automatically called on postThink(). default is ' | <!-- set if update() is automatically called on postThink(). default is ' | ||
<boolean name=' | <boolean name=' |