This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
dragengine:modules:dragonscript:behavior_playercontrollable [2025/05/07 14:27] – dragonlord | dragengine:modules:dragonscript:behavior_playercontrollable [2025/05/07 15:43] (current) – dragonlord | ||
---|---|---|---|
Line 46: | Line 46: | ||
Actor is the active player actor. | Actor is the active player actor. | ||
+ | |||
+ | ====== Behavior Tree Actions ====== | ||
+ | |||
+ | This behavior adds these behavior tree actions if behavior tree is present. | ||
+ | |||
+ | ===== playerControllable.takeControl ===== | ||
+ | |||
+ | Take control of actor by player. | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | </ | ||
+ | |||
+ | ===== playerControllable.check ===== | ||
+ | |||
+ | Check one or more player controllable parameters. Action succeeds if all parameter value matches their respective player controllable parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a player controllable parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |playerControlled|'' | ||
+ | |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 actor is controlled by player --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. | ||
+ | |||
+ | ===== playerControllable.check ===== | ||
+ | |||
+ | Check one or more player controllable parameters. Conditions returns true if all parameter value match their respective player controllable parameter. This condition is typically used to run an action or sequence of actions as long as player controllable conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |playerControllable.playerControlled|'' | ||
+ | |||
+ | 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 ====== |