[Bug] Behavior is enabled always returns true

Editor Discussion

the native trigger function "Behavior is enabled" (Galaxy: "UnitBehaviorEnabled(unit, string)") always returns true, even if the behavior is clearly disabled. (Build:

A fix for this issue would be very much appreciated.
We weren't able to reproduce this behavior internally using 1.5.3 or a current Swarm beta build. Can you please provide us with a test map to try?
Thanks for your reply!

Ive quickly created a testmap that demonstrates the issue. You can find the link at the end of this post.
Please let me know if i messed something up when testing.

Explanation of the testmap:

  • Created a behavior that disables unit movement, called "Movement Disabled"
  • Created a validator that checks if unit energy equals 0
  • Added this validator to the behavior, so the behavior should disable movement once the units energy reaches 0
  • Changed maximum and starting energy of marine to 100 and set energy regeneration to -5, so it slowly loses energy
  • Placed a marine on the map
  • Created a trigger that fires on map initialization, adding the behavior "Movement Disabled" to the marine. This trigger also runs a loop that periodically prints if the behavior is enabled by using "BehaviorIsEnabled" function.

The problem: The marine can move properly, even though he has the Movement Disabled behavior, meaning that the behavior is clearly disabled. However, the trigger always prints that the behavior is enabled (Whats impossible since the marine can still move). Once his energy reaches 0 he loses the ability to move, meaning the behavior got properly enabled. The trigger still prints true all the time.

Long story short: BehaviorIsEnabled always seems to return true even though the behavior is disabled.

Map download: http://speedy.sh/wuQFf/behavior-is-enabled-bug-report-map.SC2Map
Thanks for providing the test map; sorry for the delay getting back to you. We'll look into the issue and let you know if any further information is required.
Alright. While at it, it would be great if you guys could also take a look at the following issue that I posted a while ago:


Join the Conversation

Return to Forum