This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_ridable [2025/03/13 17:07] – dragonlord | dragengine:modules:dragonscript:behavior_ridable [2025/05/04 13:42] (current) – [ridable.check] dragonlord | ||
---|---|---|---|
Line 18: | Line 18: | ||
====== Element Class Properties ====== | ====== Element Class Properties ====== | ||
Element class properties have the prefix '' | Element class properties have the prefix '' | ||
+ | |||
====== Events ====== | ====== Events ====== | ||
- | This behavior | + | ===== beginRiding ===== |
+ | |||
+ | Ride on instance begins riding. | ||
+ | |||
+ | ===== stopRiding ===== | ||
+ | |||
+ | Ride on instance stops riding. | ||
+ | |||
+ | ====== Behavior Tree Actions ====== | ||
+ | |||
+ | This behavior | ||
+ | |||
+ | ===== ridable.check ===== | ||
+ | |||
+ | Check one or more ridable parameters. Action succeeds if all parameter value matches their respective ridable parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a ridable parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |count|integer|Count of riding ride on instances equals integer value| | ||
+ | |count.not|integer|Count of riding ride on instances does not equal integer value| | ||
+ | |count.less|integer|Count of riding ride on instances is less than integer value| | ||
+ | |count.greater|integer|Count of riding ride on instances is greater than integer value| | ||
+ | |player|'' | ||
+ | |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 player is riding --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. | ||
+ | |||
+ | ===== ridable.check ===== | ||
+ | |||
+ | Check one or more ridable parameters. Conditions returns true if all parameter value match their respective ridable parameter. This condition is typically used to run an action or sequence of actions as long as ridable conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |ridable.count|integer|Count of riding ride on instances equals integer value| | ||
+ | |ridable.count.not|integer|Count of riding ride on instances does not equal integer value| | ||
+ | |ridable.count.less|integer|Count of riding ride on instances is less than integer value| | ||
+ | |ridable.count.greater|integer|Count of riding ride on instances is greater than integer value| | ||
+ | |ridable.player|'' | ||
+ | |||
+ | 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 ====== | ||
+ | |||
+ | |||
+ | ===== ridable.beginRiding ===== | ||
+ | |||
+ | Ride on instance begins riding. | ||
+ | |||
+ | ===== ridable.stopRiding ===== | ||
+ | |||
+ | Ride on instance stops riding. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
Line 29: | Line 104: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | This behavior | + | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: |
+ | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
====== Persistency ====== | ====== Persistency ====== | ||
Line 72: | Line 148: | ||
| | ||
< | < | ||
+ | <!-- 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=' |