# Unit Behavior Enabled
Grammar — unit behavior is enabled
Flags —Native
|Function
Returns true if the specified unit has the specified behavior enabled.
# Arguments
unit
— Unitstring
[ gamelink::Behavior ] — Behavior
Returns — bool
native bool UnitBehaviorEnabled(
unit inUnit,
string inBehavior,
);
# Related
Category: Behavior / Basic
- [F] —
void
— Remove Behaviors By Category — ( UnitBehaviorRemoveCategory ) - [F] —
void
— Remove Behavior (Player) — ( UnitBehaviorRemovePlayer ) - [F] —
void
— Remove Behavior — ( UnitBehaviorRemove ) - [F] —
void
— Add Behavior (Player) — ( UnitBehaviorAddPlayer ) - [F] —
void
— Add Behavior — ( UnitBehaviorAdd ) - [F] —
void
— Set Behavior Count — ( libNtve_gf_SetBehaviorCount ) - [F] —
int
— Number Of Behaviors On Unit — ( UnitBehaviorCountAll ) - [F] —
string
[ gamelink::Behavior ] — Unit Behavior — ( UnitBehaviorGet ) - [F] —
bool
— Unit Has Behavior — ( UnitHasBehavior2 ) - [F] —
bool
— Unit Has Behavior (Enabled) — ( UnitHasBehavior ) - [F] —
bool
— Unit Behavior Enabled — ( UnitBehaviorEnabled ) - [F] —
int
— Stack Count Of Behavior On Unit — ( UnitBehaviorCount ) - [F] —
bool
— Behavior Has Flag — ( UnitBehaviorHasFlag ) - [F] —
void
— Transfer Behavior — ( UnitBehaviorTransfer ) - [F] —
void
— Set Unit Behavior Duration — ( UnitBehaviorSetDuration ) - [F] —
void
— Set Unit Behavior Duration Remaining — ( UnitBehaviorSetDurationRemaining ) - [F] —
fixed
— Duration Remaining Of Behavior On Unit — ( UnitBehaviorDuration ) - [F] —
fixed
— Duration Of Behavior On Unit — ( UnitBehaviorDurationTotal ) - [F] —
void
— Set Unit Behavior Spawn Count — ( UnitBehaviorSpawn ) - [F] —
int
— Unit Behavior Effect Player — ( UnitBehaviorEffectPlayer ) - [F] —
unit
— Unit Behavior Effect Unit — ( UnitBehaviorEffectUnit ) - [F] —
void
— Set Unit Behavior User Data — ( UnitBehaviorEffectTreeSetUserData ) - [F] —
fixed
— User Data Of Behavior On Unit — ( UnitBehaviorEffectTreeUserData ) - [F] —
bool
— User Data Of Behavior On Unit Exists — ( UnitBehaviorEffectTreeUserDataExists ) - [F] —
void
— Unit Behavior Changes — ( TriggerAddEventUnitBehaviorChange ) - [F] —
void
— Unit Behavior Changes From Category — ( TriggerAddEventUnitBehaviorChangeFromCategory ) - [F] —
string
[ gamelink::Behavior ] — Triggering Behavior — ( EventUnitBehavior ) - [F] —
int
[ preset::BehaviorChange ] — Triggering Behavior Change — ( EventUnitBehaviorChange ) - [F] —
fixed
— Unit Behavior Damage Modify Remaining — ( UnitBehaviorDamageModifyRemaining ) - [F] —
fixed
— Unit Behavior Damage Modify Limit — ( UnitBehaviorDamageModifyLimit ) - [F] —
void
— For Each Behavior On Unit — ( )
# Examples
# mods/heroes.stormmod
// 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
// 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
// L451
UnitBehaviorEnabled(libMSOC_gv_mMTombSpiderQueen[lv_itSoulCage].lv_units, "MacguffinActivated")
# mods/heromods/alexstrasza.stormmod
// L223
UnitBehaviorEnabled(lv_oldUnit, "AlexstraszaBlessingOfTheRed")
# mods/heromods/malthael.stormmod
// L215
UnitBehaviorEnabled(lv_targetUnit, "MalthaelReapersMarkTouchOfDeathDebuff")