This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_forcefield [2025/03/19 15:07] – [Behavior Factory] dragonlord | dragengine:modules:dragonscript:behavior_forcefield [2025/05/12 21:26] (current) – dragonlord | ||
---|---|---|---|
Line 156: | Line 156: | ||
Force field parameters changed. | Force field parameters changed. | ||
+ | |||
+ | ====== Behavior Tree Actions ====== | ||
+ | |||
+ | This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== forceField.set ===== | ||
+ | |||
+ | Set one or more force field parameters. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |enabled|'' | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== forceField.check ===== | ||
+ | |||
+ | Check one or more force field parameters. Action succeeds if all parameter value matches their respective force field parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a force field parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |enabled|'' | ||
+ | |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 force field is enabled --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== forceField.check ===== | ||
+ | |||
+ | Check one or more force field parameters. Conditions returns true if all parameter value match their respective force field parameter. This condition is typically used to run an action or sequence of actions as long as force field conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |forceField.enabled|'' | ||
+ | |||
+ | 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. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== forceField.enabled ===== | ||
+ | |||
+ | Force field has been enabled. | ||
+ | |||
+ | ===== forceField.disabled ===== | ||
+ | |||
+ | Force field has been disabled. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
Line 164: | Line 239: | ||
* [[behavior_collider|ECBehaviorCollider]]: | * [[behavior_collider|ECBehaviorCollider]]: | ||
+ | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: | ||
+ | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
+ | |||
====== Persistency ====== | ====== Persistency ====== | ||
Line 227: | Line 305: | ||
| | ||
<string name=' | <string name=' | ||
+ | | ||
+ | <!-- optional: add behavior trees. default adds all behavior trees. --> | ||
+ | <list name=' | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | | ||
+ | <!-- optional: add state machines. default adds all state machines. --> | ||
+ | <list name=' | ||
+ | < | ||
+ | < | ||
+ | </ | ||
| | ||
<!-- set element properties. omit property prefix if used inside behavior tag --> | <!-- set element properties. omit property prefix if used inside behavior tag --> |