This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
dragengine:modules:dragonscript:behavior_playerinputcrouch [2025/05/07 14:28] – dragonlord | dragengine:modules:dragonscript:behavior_playerinputcrouch [2025/05/07 15:40] (current) – 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. | ||
+ | |||
+ | ===== playerInputCrouch.set ===== | ||
+ | |||
+ | Set one or more player input crouch parameters. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |reset| |Reset player input crouch| | ||
+ | |crouch|'' | ||
+ | |crouch.toggle| |Toggle crouch key pressed| | ||
+ | |canCrouch|'' | ||
+ | |canCrouch.toggle| |Toggle can crouch| | ||
+ | |stance|float|Stance value in the range from 0 to 1| | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== playerInputCrouch.check ===== | ||
+ | |||
+ | Check one or more player input crouch parameters. Action succeeds if all parameter value matches their respective player input crouch parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a player input crouch parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |crouch|'' | ||
+ | |canCrouch|'' | ||
+ | |stance.less|float|Stance is less than float value| | ||
+ | |stance.greater|float|Stance is greater than float 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 crouch key is pressed --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. | ||
+ | |||
+ | ===== playerInputCrouch.check ===== | ||
+ | |||
+ | Check one or more player input crouch parameters. Conditions returns true if all parameter value match their respective player input crouch parameter. This condition is typically used to run an action or sequence of actions as long as player input crouch conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |crouch|'' | ||
+ | |canCrouch|'' | ||
+ | |stance.less|float|Stance is less than float value| | ||
+ | |stance.greater|float|Stance is greater than float 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 send no events to state machine. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== |