# Triggering Upgrade

Grammar — Triggering Upgrade
FlagsNative | Function

When “Player Upgrade Changed” occurs, “Triggering Upgrade” can be used to find out the the upgrade that changed.

Returns — string<gamelink::Upgrade>

native string EventUpgradeName();

Category: Tech Tree / Upgrades

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:15813


    // Variable Initialization
    lv_upgrade = EventUpgradeName();
    lv_player = EventPlayer();
    lv_level = TechTreeUpgradeCount(lv_player, lv_upgrade, c_techCountCompleteOnly);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:19801

    // Variable Initialization
    lv_player = EventPlayer();
    lv_upgrade = EventUpgradeName();
    lv_delta = EventUpgradeLevelDelta();

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:20798

    // Conditions
    if (testConds) {
        if (!((EventUpgradeName() == "SOARepairBeamExtraTarget"))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:22072

        }

        if (!((EventUpgradeName() == "BlimpMengskTopbarRegen"))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:23987


    // Variable Initialization
    lv_upgrade = EventUpgradeName();
    lv_costMutiplayer = 1.4;
    lv_itUnit = "";

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:27073

    }

    if (((EventUpgradeName() == "ZeratulArtifactUpgradeTier0A") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier0B") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier0C"))) {
        libCOMI_gf_CM_SendZeratulProphecyEventArtifact(lv_event, EventPlayer(), null, 0);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:27073

    }

    if (((EventUpgradeName() == "ZeratulArtifactUpgradeTier0A") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier0B") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier0C"))) {
        libCOMI_gf_CM_SendZeratulProphecyEventArtifact(lv_event, EventPlayer(), null, 0);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:27073

    }

    if (((EventUpgradeName() == "ZeratulArtifactUpgradeTier0A") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier0B") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier0C"))) {
        libCOMI_gf_CM_SendZeratulProphecyEventArtifact(lv_event, EventPlayer(), null, 0);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:27076

        libCOMI_gf_CM_SendZeratulProphecyEventArtifact(lv_event, EventPlayer(), null, 0);
    }
    else if (((EventUpgradeName() == "ZeratulArtifactUpgradeTier1A") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier1B") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier1C"))) {
        libCOMI_gf_CM_SendZeratulProphecyEventArtifact(lv_event, EventPlayer(), null, 1);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:27076

        libCOMI_gf_CM_SendZeratulProphecyEventArtifact(lv_event, EventPlayer(), null, 0);
    }
    else if (((EventUpgradeName() == "ZeratulArtifactUpgradeTier1A") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier1B") || (EventUpgradeName() == "ZeratulArtifactUpgradeTier1C"))) {
        libCOMI_gf_CM_SendZeratulProphecyEventArtifact(lv_event, EventPlayer(), null, 1);
    }

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

    }

    libCOMU_gf_CT_ApplyUberDarkness(EventUpgradeName(), EventPlayer());
    return true;
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:6391

    for ( ; ( (autoECD82AAC_ai >= 0 && lv_index <= autoECD82AAC_ae) || (autoECD82AAC_ai < 0 && lv_index >= autoECD82AAC_ae) ) ; lv_index += autoECD82AAC_ai ) {
        lv_supplemental = UserDataGetUserInstance("PlayerPrestige", lv_prestige, "UpgradeSupplements", lv_index);
        if ((UserDataGetGameLink("PlayerPrestigeUpgradeSupplements", lv_supplemental, "Upgrade", 1) == EventUpgradeName())) {
            libCOOC_gf_CC_ApplyUpgradeSupplemental(lv_player, lv_supplemental);
            break;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:9431

        }

        if (!(((EventUpgradeName() == "ZeratulArtifactTier1") || (EventUpgradeName() == "ZeratulArtifactTier2") || (EventUpgradeName() == "ZeratulArtifactTier3")))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:9431

        }

        if (!(((EventUpgradeName() == "ZeratulArtifactTier1") || (EventUpgradeName() == "ZeratulArtifactTier2") || (EventUpgradeName() == "ZeratulArtifactTier3")))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:9431

        }

        if (!(((EventUpgradeName() == "ZeratulArtifactTier1") || (EventUpgradeName() == "ZeratulArtifactTier2") || (EventUpgradeName() == "ZeratulArtifactTier3")))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:9441

    }

    auto03537F3E_val = EventUpgradeName();
    if (auto03537F3E_val == "ZeratulArtifactTier1") {
        DialogControlSetAnimationState(libCOUI_gv_cU_ZeratulSelectionButtonContainers[1], PlayerGroupAll(), "ArtifactState", "Collected");

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:9506

    // Conditions
    if (testConds) {
        if (!((EventUpgradeName() == "DeployPowerTowerTechLevel"))) {
            return false;
        }