How to code this: Only one boolean can be true at a time

You’ve stumbled into the downside of the boolean pattern.

When you want to ‘upgrade’ from boolean, and you don’t want to be able to do more than one at a time, the next level is to make the behavior depend on a enum, which I think you’ve basically done.

But if it gets much more complicated, and you have trouble figuring out when you can do what, then the stage after this is a behavior tree. Which, handily, Epic have made for you :slight_smile:

2 Likes