This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
dragengine:modules:dragonscript:behavior_playerinputturn [2025/05/07 14:28] – dragonlord | dragengine:modules:dragonscript:behavior_playerinputturn [2025/05/07 15:01] (current) – dragonlord | ||
---|---|---|---|
Line 36: | Line 36: | ||
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. | ||
+ | |||
+ | ===== playerInputTurn.set ===== | ||
+ | |||
+ | Set one or more player input turn parameters. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |reset| |Reset player input turn| | ||
+ | |left|'' | ||
+ | |left.toggle| |Toggle left turn key pressed| | ||
+ | |right|'' | ||
+ | |right.toggle| |Toggle right turn key pressed| | ||
+ | |speed|float|Turn speed in m/s| | ||
+ | |analog|float|Analog turn value in the range from -180 to 180 degrees| | ||
+ | |analog.sticky|float|Sticky analog turn value in the range from -180 to 180 degrees| | ||
+ | |canTurn|'' | ||
+ | |canTurn.toggle| |Toggle can turn| | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== playerInputTurn.check ===== | ||
+ | |||
+ | Check one or more player input turn parameters. Action succeeds if all parameter value matches their respective player input turn parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a player input turn parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |left|'' | ||
+ | |speed.less|float|Speed is less than float value m/s| | ||
+ | |speed.greater|float|Speed is greater than float value m/s| | ||
+ | |analog.less|float|Analog value is less than float value degrees| | ||
+ | |analog.greater|float|Analog value is greater than float value degrees| | ||
+ | |analog.sticky.less|float|Sticky analog value is less than float value degrees| | ||
+ | |analog.sticky.greater|float|Sticky analog value is greater than float value degrees| | ||
+ | |canTurn|'' | ||
+ | |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 left turn key is pressed --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. | ||
+ | |||
+ | ===== playerInputTurn.check ===== | ||
+ | |||
+ | Check one or more player input turn parameters. Conditions returns true if all parameter value match their respective player input turn parameter. This condition is typically used to run an action or sequence of actions as long as player input turn conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |playerInputTurn.left|'' | ||
+ | |playerInputTurn.speed.less|float|Speed is less than float value m/s| | ||
+ | |playerInputTurn.speed.greater|float|Speed is greater than float value m/s| | ||
+ | |playerInputTurn.analog.less|float|Analog value is less than float value degrees| | ||
+ | |playerInputTurn.analog.greater|float|Analog value is greater than float value degrees| | ||
+ | |playerInputTurn.analog.sticky.less|float|Sticky analog value is less than float value degrees| | ||
+ | |playerInputTurn.analog.sticky.greater|float|Sticky analog value is greater than float value degrees| | ||
+ | |playerInputTurn.canTurn|'' | ||
+ | |||
+ | 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 ====== |