# Triggering Effect Impact Unit

Grammar — Triggering Effect Impact Unit
FlagsNative | Function

Returns — unit

native unit EventPlayerEffectUsedUnitImpact();

# Supported triggers

Category: Environment / Effects

# Examples

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:5751


    // Variable Initialization
    lv_targetUnit = EventPlayerEffectUsedUnitImpact();

    // Conditions

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmapMapScript.galaxy:5751


    // Variable Initialization
    lv_targetUnit = EventPlayerEffectUsedUnitImpact();

    // Conditions

mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmodbase.stormdata/LibPEB1.galaxy:7511

    // Conditions
    if (testConds) {
        if (!((UnitGetType(EventPlayerEffectUsedUnitImpact()) == "MedicMedivacDropship"))) {
            return false;
        }

mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmodbase.stormdata/LibPEB1.galaxy:7533

        	auto8E7067A4_var = PlayerGroupNextPlayer(auto8E7067A4_g, auto8E7067A4_var);
        	if (auto8E7067A4_var<0) { break; }
        	if ((libPVEM_gf_PvEPlayerIsValidHumanPlayer(auto8E7067A4_var) == false) && (UnitIsAlive(libGame_gv_players[auto8E7067A4_var].lv_heroUnit) == true) && (DistanceBetweenPoints(UnitGetPosition(EventPlayerEffectUsedUnitImpact()), UnitGetPosition(libGame_gv_players[auto8E7067A4_var].lv_heroUnit)) < 14.0)) {
            UnitDestroyAIThinkTree(libGame_gv_players[auto8E7067A4_var].lv_heroUnit);
            UnitIssueOrder(libGame_gv_players[auto8E7067A4_var].lv_heroUnit, OrderTargetingUnit(AbilityCommand("CaptureMacGuffin", 0), EventPlayerEffectUsedUnitImpact()), c_orderQueueReplace);

mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmodbase.stormdata/LibPEB1.galaxy:7535

        	if ((libPVEM_gf_PvEPlayerIsValidHumanPlayer(auto8E7067A4_var) == false) && (UnitIsAlive(libGame_gv_players[auto8E7067A4_var].lv_heroUnit) == true) && (DistanceBetweenPoints(UnitGetPosition(EventPlayerEffectUsedUnitImpact()), UnitGetPosition(libGame_gv_players[auto8E7067A4_var].lv_heroUnit)) < 14.0)) {
            UnitDestroyAIThinkTree(libGame_gv_players[auto8E7067A4_var].lv_heroUnit);
            UnitIssueOrder(libGame_gv_players[auto8E7067A4_var].lv_heroUnit, OrderTargetingUnit(AbilityCommand("CaptureMacGuffin", 0), EventPlayerEffectUsedUnitImpact()), c_orderQueueReplace);
        }

mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmodbase.stormdata/LibPVEB.galaxy:1999

    // Conditions
    if (testConds) {
        if (!((UnitHasBehavior2(EventPlayerEffectUsedUnitImpact(), "PickupRevealer") == true))) {
            return false;
        }

mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmodbase.stormdata/LibPVEM.galaxy:2362

    // Conditions
    if (testConds) {
        if (!((UnitHasBehavior2(EventPlayerEffectUsedUnitImpact(), "PickupRevealer") == true))) {
            return false;
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:4536

    }

    UnitBehaviorAdd(EventPlayerEffectUsedUnitLaunch(), "PeriodicDamageRevealSourceCloakedRevealer", EventPlayerEffectUsedUnitImpact(), 1);
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:4556

    }

    UnitBehaviorAdd(EventPlayerEffectUsedUnitLaunch(), "OneOffDamageRevealSourceCloakedRevealer", EventPlayerEffectUsedUnitImpact(), 1);
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:7632

    // Automatic Variable Declarations
    // Variable Initialization
    lv_target = EventPlayerEffectUsedUnitImpact();
    lv_player = UnitGetOwner(lv_target);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:12058

    // Automatic Variable Declarations
    // Variable Initialization
    lv_target = EventPlayerEffectUsedUnitImpact();
    lv_player = UnitGetOwner(lv_target);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:18976

    lv_rexxar = EventPlayerEffectUsedUnitLaunch();
    lv_rexxarPlayer = UnitGetOwner(lv_rexxar);
    lv_target = EventPlayerEffectUsedUnitImpact();

    // Actions

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:19046

    lv_misha = EventPlayerEffectUsedUnitLaunch();
    lv_rexxarPlayer = UnitGetOwner(lv_misha);
    lv_target = EventPlayerEffectUsedUnitImpact();

    // Conditions

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:21522

    // Automatic Variable Declarations
    // Variable Initialization
    lv_target = EventPlayerEffectUsedUnitImpact();
    lv_player = UnitGetOwner(lv_target);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:22615

    // Automatic Variable Declarations
    // Variable Initialization
    lv_target = EventPlayerEffectUsedUnitImpact();
    lv_player = UnitGetOwner(lv_target);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:22945

    // Automatic Variable Declarations
    // Variable Initialization
    lv_target = EventPlayerEffectUsedUnitImpact();
    lv_player = UnitGetOwner(lv_target);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:23558

    }

    UnitCreateEffectPointWithSource(EventPlayerEffectUsedUnitImpact(), "TinkerDethLazorFirinMahLazorzTargetPersistent", Point(libGDHL_gv_heroTinkerFirinMahLazorzMousePositionX[lv_player], libGDHL_gv_heroTinkerFirinMahLazorzMousePositionY[lv_player]), c_gameCatalogAbil, "TinkerDethLazorCharged");
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SoundLib.galaxy:1464

    // Variable Initialization
    lv_healMinimum = 12.0;
    lv_impactPlayer = UnitGetOwner(EventPlayerEffectUsedUnitImpact());
    lv_launchPlayer = UnitGetOwner(EventPlayerEffectUsedUnitLaunch());
    lv_vOGroup = PlayerGroupEmpty();

mods/heroesmapmods/battlegroundmapmods/overwatchdata.stormmodbase.stormdata/LibOVER.galaxy:345

    // Variable Initialization
    lv_bossUnit = EventPlayerEffectUsedUnit(c_effectUnitCaster);
    lv_targetUnit = EventPlayerEffectUsedUnitImpact();
    lv_targetAllyTeam = libGame_gf_TeamNumberOfPlayer(UnitGetOwner(lv_targetUnit));
    lv_targetEnemyTeam = libGame_gf_EnemyTeam(lv_targetAllyTeam);

mods/heromods/alexstrasza.stormmodbase.stormdata/LibHALE.galaxy:82

    // Automatic Variable Declarations
    // Variable Initialization
    lv_alexstrasza = EventPlayerEffectUsedUnitImpact();
    lv_targetUnit = EventPlayerEffectUsedUnitLaunch();
    lv_castingPlayer = EventPlayer();

mods/heromods/malganis.stormmodbase.stormdata/LibHMLG.galaxy:497

    // Variable Initialization
    lv_castingUnit = EventPlayerEffectUsedUnitLaunch();
    lv_targetUnit = EventPlayerEffectUsedUnitImpact();
    lv_castingPlayer = UnitGetOwner(lv_castingUnit);
    lv_durationValue = (CatalogFieldValueGetAsFixed(c_gameCatalogBehavior, "MalGanisDarkConversionSwapDoT", "Duration", lv_castingPlayer) / CatalogFieldValueGetAsFixed(c_gameCatalogBehavior, "MalGanisDarkConversionSwapDoT", "Period", lv_castingPlayer));

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova01.sc2map/MapScript.galaxy:2780

        }

        if (!((EventPlayerEffectUsedUnitImpact() == gv_artanis))) {
            return false;
        }

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova03.sc2map/MapScript.galaxy:2295

        }

        if (!((EventPlayerEffectUsedUnitImpact() == gv_zeratul))) {
            return false;
        }

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2130

        }

        if (!((UnitGetOwner(EventPlayerEffectUsedUnitImpact()) == gv_pLAYER_01_USER))) {
            return false;
        }

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2134

        }

        if (!((libNtve_gf_UnitIsVisibleToPlayer(EventPlayerEffectUsedUnitImpact(), EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster)) == false))) {
            return false;
        }

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2144

    }

    if ((UnitHasBehavior2(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected") == false)) {
        UnitBehaviorAdd(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected", EventPlayerEffectUsedUnitLaunch(), 1);
        gf_S2TrackUnitHitBySonar(EventPlayerEffectUsedUnitImpact());

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2145


    if ((UnitHasBehavior2(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected") == false)) {
        UnitBehaviorAdd(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected", EventPlayerEffectUsedUnitLaunch(), 1);
        gf_S2TrackUnitHitBySonar(EventPlayerEffectUsedUnitImpact());
    }

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2146

    if ((UnitHasBehavior2(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected") == false)) {
        UnitBehaviorAdd(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected", EventPlayerEffectUsedUnitLaunch(), 1);
        gf_S2TrackUnitHitBySonar(EventPlayerEffectUsedUnitImpact());
    }
    else {

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2149

    }
    else {
        UnitBehaviorAdd(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected", EventPlayerEffectUsedUnitLaunch(), 1);
    }
    return true;

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:2179

        }

        if (!((EventPlayerEffectUsedUnitImpact() == gv_nova))) {
            return false;
        }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova01.sc2mapMapScript.galaxy:2780

        }

        if (!((EventPlayerEffectUsedUnitImpact() == gv_artanis))) {
            return false;
        }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova03.sc2mapMapScript.galaxy:2295

        }

        if (!((EventPlayerEffectUsedUnitImpact() == gv_zeratul))) {
            return false;
        }

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2130

        }

        if (!((UnitGetOwner(EventPlayerEffectUsedUnitImpact()) == gv_pLAYER_01_USER))) {
            return false;
        }

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2134

        }

        if (!((libNtve_gf_UnitIsVisibleToPlayer(EventPlayerEffectUsedUnitImpact(), EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster)) == false))) {
            return false;
        }

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2144

    }

    if ((UnitHasBehavior2(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected") == false)) {
        UnitBehaviorAdd(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected", EventPlayerEffectUsedUnitLaunch(), 1);
        gf_S2TrackUnitHitBySonar(EventPlayerEffectUsedUnitImpact());

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2145


    if ((UnitHasBehavior2(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected") == false)) {
        UnitBehaviorAdd(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected", EventPlayerEffectUsedUnitLaunch(), 1);
        gf_S2TrackUnitHitBySonar(EventPlayerEffectUsedUnitImpact());
    }

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2146

    if ((UnitHasBehavior2(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected") == false)) {
        UnitBehaviorAdd(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected", EventPlayerEffectUsedUnitLaunch(), 1);
        gf_S2TrackUnitHitBySonar(EventPlayerEffectUsedUnitImpact());
    }
    else {

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2149

    }
    else {
        UnitBehaviorAdd(EventPlayerEffectUsedUnitImpact(), "DetectorConeDetected", EventPlayerEffectUsedUnitLaunch(), 1);
    }
    return true;

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:2179

        }

        if (!((EventPlayerEffectUsedUnitImpact() == gv_nova))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:12784

    }

    UnitGroupAdd(libCOMU_gv_cT_OrderCostImmuneUnits, EventPlayerEffectUsedUnitImpact());
    Wait(0.0625, c_timeGame);
    UnitGroupRemove(libCOMU_gv_cT_OrderCostImmuneUnits, EventPlayerEffectUsedUnitImpact());

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:12786

    UnitGroupAdd(libCOMU_gv_cT_OrderCostImmuneUnits, EventPlayerEffectUsedUnitImpact());
    Wait(0.0625, c_timeGame);
    UnitGroupRemove(libCOMU_gv_cT_OrderCostImmuneUnits, EventPlayerEffectUsedUnitImpact());
    return true;
}