# Unit Behavior Enabled

Grammarunit behavior is enabled
FlagsNative | Function

Returns true if the specified unit has the specified behavior enabled.

# Arguments

  • unit — Unit
  • string [ gamelink::Behavior ] — Behavior

Returns — bool

native bool UnitBehaviorEnabled(
	unit inUnit,
	string inBehavior,
);

Category: Behavior / Basic

# Examples

# mods/heroes.stormmod

MapScript.galaxy

// L5864
UnitBehaviorEnabled(libGame_gv_players[libStEx_gv_pLAYER_01_USER].lv_heroUnit, "Mounted")
// L5864
UnitBehaviorEnabled(libGame_gv_players[libStEx_gv_pLAYER_01_USER].lv_heroUnit, "Mounted")

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L3046
UnitBehaviorEnabled(lv_misha, "RexxarMishaLeashTimeToLeash")
// L3055
UnitBehaviorEnabled(lv_misha, "RexxarMishaLeashGracePeriod")
// L3203
UnitBehaviorEnabled(lv_misha, "RexxarMishaHold")
// L3229
UnitBehaviorEnabled(lv_misha, "RexxarMishaHold")

# mods/heroesdata.stormmod

StartingExperienceLib.galaxy

// L3120
UnitBehaviorEnabled(libGame_gv_players[1].lv_heroUnit, "ShrubStatusController")
// L3758
UnitBehaviorEnabled(libGame_gv_players[libStEx_gv_sE_Player].lv_heroUnit, "Mounted")

# mods/heroesmapmods/battlegroundmapmods/tombofthespiderqueen.stormmod

LibMSOC.galaxy

// L451
UnitBehaviorEnabled(libMSOC_gv_mMTombSpiderQueen[lv_itSoulCage].lv_units, "MacguffinActivated")

# mods/heromods/alexstrasza.stormmod

LibHALE.galaxy

// L223
UnitBehaviorEnabled(lv_oldUnit, "AlexstraszaBlessingOfTheRed")

# mods/heromods/malthael.stormmod

LibHMTH.galaxy

// L215
UnitBehaviorEnabled(lv_targetUnit, "MalthaelReapersMarkTouchOfDeathDebuff")