0

Change the modular behavior units from the relative "toggle" to absolute Enable / Disable

CSmith 3 weeks ago updated 3 weeks ago 0

RE: When a Flow Behavior or State Behavior is marked as modular

I think "Toggle" can be dangerous and leave uncertainty about it's guaranteed state at any time.

I want to suggest making it 2 versions (in the way you can do get (drag) or set (alt-drag) vars)

Drag = Enable

Alt-Drag = Disable

I'd rather code toggle behavior manually if/when it's needed but make the units absolute.


EXAMPLE:

Below I have "absolute" events that I know will Activate or DeActivate the Game UI, but I can't guarantee my Game State machine will be enabled or disabled for sure.  It depends on what state it was left in outside of this behavior.

If the left unit under the SHOW event stream was Enable and the right was Disable, I would know exactly what this behavior's instruction is. With toggle I don't because it's relative.

Even if the game state is already enabled when I call enable, I would rather it just stay enabled or vice versa stay disabled despite a redundant call to disable.

Bolt Version:
2.0.0.08
Unity Version:
2019.3
Platform(s):
OSX
Scripting Backend:
.NET Version (API Compatibility Level):
Bolt 2