Force Failure
The Force Failure node is a decorator that always returns a Failure state, regardless of the result of the child node's execution. This means that even if the child node completes successfully (Success), Force Failure will convert it to Failure.
Usage Example:
Force Failure
└── Child Node (Success)
Operation:
- The Force Failure node executes its child node.
- If the child node completes successfully (
Success), Force Failure changes the result toFailure. - In case the child node completes as
FailureorRunning, Force Failure also returnsFailure.
Purpose: The Force Failure node is useful in situations where it is necessary to interrupt the execution of a specific sequence of actions, even if they have completed successfully. For example, when there is a need to forcibly terminate a chain of actions in case a certain condition arises.
Note: Using Force Failure can be beneficial for controlling the execution of a behavior tree and managing the flow of actions in game scenarios.