Yes. Idealy, conditions should not change the game state.
To me, it seems like you are seperating your tasks in a similar fashion to states, where for behaviour trees it most likely isn’t going to work nice.
Personaly, I would have split this into:
– HasTarget (condition)
– AttackTarget (action)
Where the AttackTarget, would include how the character moves up to that target to be able to attack correctly.
Alternatively, you could simply create a single action AttackTarget, that includes the move to target as above and checks if the character has a target. A more self-contained action task.
The change you are suggesting will unfortunately break existing behaviour indeed and will not work correctly in all scenarios, like for example under a Dynamic Sequencer, where instead of executing the action even in case of Failure, you would want it to execute it even in case of Success instead, since basicaly Sequencer works vice-versa of the Selector.
Let me know.
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.