# Unit Behavior Effect Player
Grammar — Get Effect player for behavior (stackIndex) on unit
Flags —Native
|Function
# Arguments
unit
— Unitstring
<gamelink::Behavior> — Behaviorint
<preset::EffectPlayer> — Playerint
— Stack Index
Returns — int
native int UnitBehaviorEffectPlayer(
unit inUnit,
string inBehavior,
int inLocation,
int inIndex,
);
# Related
Category: Behavior / Basic
- Remove Behaviors By Category —
void
— UnitBehaviorRemoveCategory - Remove Behavior (Player) —
void
— UnitBehaviorRemovePlayer - Remove Behavior —
void
— UnitBehaviorRemove - Add Behavior (Player) —
void
— UnitBehaviorAddPlayer - Add Behavior —
void
— UnitBehaviorAdd - Set Behavior Count —
void
— libNtve_gf_SetBehaviorCount - Number Of Behaviors On Unit —
int
— UnitBehaviorCountAll - Unit Behavior —
string
<gamelink::Behavior> — UnitBehaviorGet - Unit Has Behavior —
bool
— UnitHasBehavior2 - Unit Has Behavior (Enabled) —
bool
— UnitHasBehavior - Unit Behavior Enabled —
bool
— UnitBehaviorEnabled - Stack Count Of Behavior On Unit —
int
— UnitBehaviorCount - Behavior Has Flag —
bool
— UnitBehaviorHasFlag - Transfer Behavior —
void
— UnitBehaviorTransfer - Set Unit Behavior Duration —
void
— UnitBehaviorSetDuration - Set Unit Behavior Duration Remaining —
void
— UnitBehaviorSetDurationRemaining - Duration Remaining Of Behavior On Unit —
fixed
— UnitBehaviorDuration - Duration Of Behavior On Unit —
fixed
— UnitBehaviorDurationTotal - Set Unit Behavior Spawn Count —
void
— UnitBehaviorSpawn - Unit Behavior Effect Player —
int
— UnitBehaviorEffectPlayer - Unit Behavior Effect Unit —
unit
— UnitBehaviorEffectUnit - Set Unit Behavior User Data —
void
— UnitBehaviorEffectTreeSetUserData - User Data Of Behavior On Unit —
fixed
— UnitBehaviorEffectTreeUserData - User Data Of Behavior On Unit Exists —
bool
— UnitBehaviorEffectTreeUserDataExists - Unit Behavior Changes —
void
— TriggerAddEventUnitBehaviorChange - Unit Behavior Changes From Category —
void
— TriggerAddEventUnitBehaviorChangeFromCategory - Triggering Behavior —
string
<gamelink::Behavior> — EventUnitBehavior - Triggering Behavior Change —
int
<preset::BehaviorChange> — EventUnitBehaviorChange - Unit Behavior Damage Modify Remaining —
fixed
— UnitBehaviorDamageModifyRemaining - Unit Behavior Damage Modify Limit —
fixed
— UnitBehaviorDamageModifyLimit - For Each Behavior On Unit — macro
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:6242
}
lv_owner = UnitBehaviorEffectPlayer(lv_unit, "ArtanisSpearofAdunPurifierBeamTargeting", c_effectPlayerCaster, 0);
lv_timeRemaining = UnitBehaviorDuration(lv_unit, "ArtanisSpearofAdunPurifierBeamTargeting");
if ((libGame_gf_CheckUnitForAbilityRedirectBoolean() == true)) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:7720
}
lv_butcherPlayer = UnitBehaviorEffectPlayer(lv_unit, EventUnitBehavior(), c_effectPlayerCaster, 0);
lv_target = lv_unit;
lv_butcherPlayer = UnitGetOwner(UnitBehaviorEffectUnit(lv_unit, "RuthlessOnslaughtTarget", c_effectUnitCaster, 0));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:22095
// Variable Initialization
lv_sylvanasPlayer = UnitBehaviorEffectPlayer(EventUnit(), "SylvanasMindControlDarkLadysCallVisionReduction", c_effectPlayerSource, 0);
lv_targethero = EventUnit();
lv_targetplayer = UnitGetOwner(lv_targethero);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:24068
UnitBehaviorAdd(lv_unit, "TyraelSanctificationDisplayBehavior", UnitBehaviorEffectUnit(lv_unit, lv_sanctificationBehavior, c_effectUnitCaster, 0), 1);
UnitBehaviorSetDurationRemaining(lv_unit, "TyraelSanctificationDisplayBehavior", TimerGetRemaining(libGDHL_gv_sanctifcationTimer[UnitBehaviorEffectPlayer(lv_unit, lv_sanctificationBehavior, c_effectPlayerOrigin, 0)]));
if ((UnitTestState(lv_unit, c_unitStateHallucination) == false) && (UnitHasBehavior2(lv_unit, "HeroGenericIgnoreFullscreenOverlay") == false)) {
libUIUI_gf_FullscreenOverlayAddItemForPlayer(EventPlayer(), libUIUI_ge_FullscreenOverlayPriorities_Invulnerable, "Cutscenes\\GameUI_InvulnerableOverlay.StormCutscene", lv_sanctificationBehavior);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:24480
lv_debuff = "WitchDoctorVoodooRitualDeathRitualTalentDoT";
}
lv_witchDoctor = libGame_gv_players[UnitBehaviorEffectPlayer(lv_killedUnit, lv_debuff, c_effectPlayerCaster, 0)].lv_heroUnit;
lv_wDPlayer = UnitGetOwner(lv_witchDoctor);
if ((UnitTypeTestAttribute(UnitGetType(lv_killedUnit), c_unitAttributeStructure) == false) && (UnitTypeTestAttribute(UnitGetType(lv_killedUnit), c_unitAttributeSummoned) == false) && (UnitTypeTestAttribute(UnitGetType(lv_killedUnit), c_unitAttributeCreep) == false) && (UnitTypeTestAttribute(UnitGetType(lv_killedUnit), c_unitAttributeMerc) == false) && (UnitTypeTestAttribute(UnitGetType(lv_killedUnit), c_unitAttributeMinion) == true)) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:7116
if ((UnitHasBehavior2(lv_itUnit, "EarnsXP") == true)) {
lv_heroPlayer = UnitBehaviorEffectPlayer(lv_itUnit, "EarnsXP", c_effectPlayerOrigin, 0);
if ((lv_heroPlayer <= libCore_gv_bALMaxPlayers)) {
lv_playerIsNearDeadPlayer[lv_heroPlayer] = true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:15300
}
lv_caster = UnitBehaviorEffectPlayer(lv_triggeringUnit, EventUnitBehavior(), c_effectPlayerCaster, 0);
if (((lv_caster <= 0) || (lv_caster > libCore_gv_bALMaxPlayers))) {
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:15331
// Automatic Variable Declarations
// Variable Initialization
lv_casterPlayer = UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0);
lv_damageAbsorbed = EventUnitDamageAbsorbed();
lv_casterUnit = UnitBehaviorEffectUnit(lv_shieldedUnit, EventUnitBehavior(), c_effectUnitCaster, 0);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:15398
}
lv_caster = UnitBehaviorEffectPlayer(lv_triggeringUnit, EventUnitBehavior(), c_effectPlayerCaster, 0);
if (((lv_caster <= 0) || (lv_caster > libCore_gv_bALMaxPlayers))) {
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:15440
}
lv_caster = UnitBehaviorEffectPlayer(lv_triggeringUnit, EventUnitBehavior(), c_effectPlayerCaster, 0);
if (((lv_caster <= 0) || (lv_caster > libCore_gv_bALMaxPlayers))) {
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:20148
}
lv_caster = UnitBehaviorEffectPlayer(lv_triggeringUnit, EventUnitBehavior(), c_effectPlayerCaster, 0);
if (((lv_caster <= 0) || (lv_caster > libCore_gv_bALMaxPlayers))) {
return true;
mods/heroesmapmods/battlegroundmapmods/hanamura.stormmod — base.stormdata/LibNPLD.galaxy:942
}
libNtve_gf_CreateUnitsWithDefaultFacing(1, "OverwatchTurretPayloadPlayer", c_unitCreateIgnorePlacement, libGame_gf_ComputerPlayerInTeam(libGame_gf_TeamNumberOfPlayer(UnitBehaviorEffectPlayer(EventUnit(), "Payload_HasTurret", c_effectPlayerCaster, 0))), UnitGetPosition(libNPLD_gv_neutralPayload.lv_unit), null);
UnitCreateEffectUnit(UnitLastCreated(), "Payload_LinkActor", libNPLD_gv_neutralPayload.lv_unit);
libCore_gf_StoreUnitForUnit(libNPLD_gv_neutralPayload.lv_unit, 1, UnitLastCreated());
mods/heromods/alarak.stormmod — base.stormdata/LibHALA.galaxy:527
UnitCreateEffectUnit(lv_unit, "AlarakSadismRiteofRakShirMarkerDummy", lv_unit);
if ((libHALA_gv_heroAlarakRiteofRakShirActivelyTransferring[UnitBehaviorEffectPlayer(lv_unit, "AlarakSadismRiteofRakShirTalentDebuff", c_effectPlayerCaster, 0)] == false)) {
UnitCreateEffectUnit(UnitBehaviorEffectUnit(EventUnit(), EventUnitBehavior(), c_effectUnitCaster, 0), "OneOffDamageRevealSourceApplyRevealer", lv_unit);
}
mods/heromods/alarak.stormmod — base.stormdata/LibHALA.galaxy:531
}
else {
libHALA_gv_heroAlarakRiteofRakShirActivelyTransferring[UnitBehaviorEffectPlayer(lv_unit, "AlarakSadismRiteofRakShirTalentDebuff", c_effectPlayerCaster, 0)] = false;
}
return true;
mods/heromods/dehaka.stormmod — base.stormdata/LibHDEH.galaxy:790
}
lv_dehakaPlayer = UnitBehaviorEffectPlayer(EventUnit(), "DehakaIsolationVisionSource", c_effectPlayerCaster, 0);
UnitGroupRemove(libHDEH_gv_heroDehakaIsolationBackupVisionGroups[lv_targetplayer], EventUnit());
if ((UnitGroupCount(libHDEH_gv_heroDehakaIsolationBackupVisionGroups[lv_targetplayer], c_unitCountAlive) == 0)) {
mods/heromods/dehaka.stormmod — base.stormdata/LibHDEH.galaxy:835
// Variable Initialization
lv_dehakaPlayer = UnitBehaviorEffectPlayer(EventUnit(), "DehakaIsolationVisionReduction", c_effectPlayerSource, 0);
lv_targethero = EventUnit();
lv_targetplayer = UnitGetOwner(lv_targethero);
mods/heromods/maiev.stormmod — base.stormdata/LibHMAI.galaxy:228
}
lv_maievPlayer = UnitBehaviorEffectPlayer(lv_targetUnit, "MaievContainmentDiscVisionSource", c_effectPlayerCaster, 0);
UnitGroupRemove(libHMAI_gv_heroMaievContainmentDiscBackupVisionGroups[lv_targetplayer], lv_targetUnit);
if ((UnitGroupCount(libHMAI_gv_heroMaievContainmentDiscBackupVisionGroups[lv_targetplayer], c_unitCountAlive) == 0)) {
mods/heromods/maiev.stormmod — base.stormdata/LibHMAI.galaxy:277
lv_typeOfTargetUnit = UnitGetType(lv_targetUnit);
lv_targetplayer = UnitGetOwner(lv_targetUnit);
lv_maievPlayer = UnitBehaviorEffectPlayer(lv_targetUnit, "MaievContainmentDiscTimeStop", c_effectPlayerCaster, 0);
lv_targetPlayerVisionGroup = UnitGroupEmpty();
lv_AllyPlayerGroup = PlayerGroupEmpty();
mods/heromods/malganis.stormmod — base.stormdata/LibHMLG.galaxy:178
}
lv_malGanisPlayer = UnitBehaviorEffectPlayer(lv_targetUnit, "MalGanisFelClawsBlindAsABatBehavior", c_effectPlayerCaster, 0);
UnitGroupRemove(libHMLG_gv_heroMalGanisBlindasaBatBackupVisionGroups[lv_targetplayer], lv_targetUnit);
if ((UnitGroupCount(libHMLG_gv_heroMalGanisBlindasaBatBackupVisionGroups[lv_targetplayer], c_unitCountAlive) == 0)) {
mods/heromods/malganis.stormmod — base.stormdata/LibHMLG.galaxy:227
lv_typeOfTargetUnit = UnitGetType(lv_targetUnit);
lv_targetplayer = UnitGetOwner(lv_targetUnit);
lv_malGanisPlayer = UnitBehaviorEffectPlayer(lv_targetUnit, "MalGanisFelClawsBlindAsABatBehavior", c_effectPlayerCaster, 0);
lv_targetPlayerVisionGroup = UnitGroupEmpty();
lv_AllyPlayerGroup = PlayerGroupEmpty();
mods/heromods/malganis.stormmod — base.stormdata/LibHMLG.galaxy:607
}
lv_malGanisPlayer = UnitBehaviorEffectPlayer(lv_targetUnit, "MalGanisNightRushAloneInTheDarkTrigger", c_effectPlayerCaster, 0);
UnitGroupRemove(libHMLG_gv_heroMalGanisNightRushBackupVisionGroups[lv_targetplayer], lv_targetUnit);
if ((UnitGroupCount(libHMLG_gv_heroMalGanisNightRushBackupVisionGroups[lv_targetplayer], c_unitCountAlive) == 0)) {
mods/heromods/malganis.stormmod — base.stormdata/LibHMLG.galaxy:656
lv_typeOfTargetUnit = UnitGetType(lv_targetUnit);
lv_targetplayer = UnitGetOwner(lv_targetUnit);
lv_malGanisPlayer = UnitBehaviorEffectPlayer(lv_targetUnit, "MalGanisNightRushAloneInTheDarkTrigger", c_effectPlayerCaster, 0);
lv_targetPlayerVisionGroup = UnitGroupEmpty();
lv_AllyPlayerGroup = PlayerGroupEmpty();
mods/heromods/zarya.stormmod — base.stormdata/LibHZAR.galaxy:637
}
libHZAR_gv_heroZaryaGravitonSurgeCaster[lv_localOwnerofTriggeringUnit] = UnitBehaviorEffectPlayer(EventUnit(), "ZaryaGravitonSurgePull", c_effectPlayerCaster, 0);
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:3539
lv_bstackcount = UnitBehaviorCount(lp_parent, lv_b);
if ((CatalogFieldValueGetAsInt(c_gameCatalogBehavior, lv_b, "BehaviorCategories[" + IntToString(c_unitBehaviorFlagFast) + "]", c_playerAny) == 1)) {
lv_behaviorplayer = UnitBehaviorEffectPlayer(lp_parent, lv_b, c_effectPlayerOrigin, 0);
lv_totaldmgmultiplier += (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogBehavior, lv_b, "Modification.DamageDealtFraction[" + IntToString(0) + "]", lv_behaviorplayer) * lv_bstackcount);
lv_totalattackratemultiplier *= Pow(libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogBehavior, lv_b, "Modification.AttackSpeedMultiplier", lv_behaviorplayer), lv_bstackcount);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:14113
lv_buff = EventUnitBehavior();
lv_unit = EventUnit();
lv_scale = StringToFixed(CatalogFieldValueGet(c_gameCatalogBehavior, lv_buff, "Modification.RateMultiplierArray[" + IntToString(0) + "]", UnitBehaviorEffectPlayer(lv_unit, lv_buff, c_effectPlayerCaster, 0)));
// Conditions
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:15057
}
UnitSetOwner(lv_mindcontrolunit, UnitBehaviorEffectPlayer(lv_mindcontrolunit, lv_mindcontrolbehavior, c_effectPlayerCaster, 0), true);
if ((UnitHasBehavior2(lv_mindcontrolunit, "OnDeathControllerDeathPrevent") == false)) {
UnitBehaviorAdd(lv_mindcontrolunit, "AllUnitBehaviorController", lv_mindcontrolunit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:18102
// Conditions
if (testConds) {
if (!((TechTreeUpgradeCount(UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0), "FenixSentryNullShieldReflect", c_techCountCompleteOnly) == 1))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:18185
}
lv_fenixPlayer = UnitBehaviorEffectPlayer(EventUnit(), "FenixImmortalDetonation", c_effectPlayerCaster, 0);
lv_fraction = (StringToFixed(CatalogFieldValueGet(c_gameCatalogEffect, "FenixTaldarinImmortalDetonationDummyFraction", "Amount", lv_fenixPlayer)) / 100);
lv_amount = (UnitGetCustomValue(EventUnit(), 62) * lv_fraction);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:22949
// Automatic Variable Declarations
// Variable Initialization
lv_p = UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0);
lv_pg = PlayerGroupSingle(lv_p);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:23050
// Automatic Variable Declarations
// Variable Initialization
lv_p = UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0);
// Actions
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:23077
// Automatic Variable Declarations
// Variable Initialization
lv_p = UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0);
// Actions
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25560
// Automatic Variable Declarations
// Variable Initialization
lv_p = UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0);
lv_pg = PlayerGroupSingle(lv_p);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25773
// Automatic Variable Declarations
// Variable Initialization
lv_p = UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0);
// Actions