# Add To Achievement Term Quantity

Grammar — Adds to achievement term term quantity with quantity for player player
FlagsNative | Action | Restricted

This feature only works on Blizzard-signed maps.

# Arguments

  • int — Player
  • string<gamelink::AchievementTerm> — Term
  • int — Quantity

Returns — void

native void AchievementTermQuantityAdd(
	int player,
	string term,
	int quantity,
);

Category: Game / Achievements

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10276

    libVoiC_gv_pC_AchievementShieldAbsorbTotal += EventUnitDamageAbsorbed();
    if (((FixedToInt(libVoiC_gv_pC_AchievementShieldAbsorbTotal) - FixedToInt(libVoiC_gv_pC_AchievementShieldAbsorbLast)) > 5)) {
        AchievementTermQuantityAdd(1, "SOA_ShieldOvercharge", (FixedToInt(libVoiC_gv_pC_AchievementShieldAbsorbTotal) - FixedToInt(libVoiC_gv_pC_AchievementShieldAbsorbLast)));
        libVoiC_gv_pC_AchievementShieldAbsorbLast = libVoiC_gv_pC_AchievementShieldAbsorbTotal;
    }

mods/novastoryassets.sc2modbase2.sc2maps/maps/campaign/nova/nova06.sc2map/MapScript.galaxy:4968


    gv_nukeKills += 1;
    AchievementTermQuantityAdd(gv_pLAYER_01_USER, "Nova06_2", 1);
    if ((gv_nukeAchievementTriggered == false) && (gv_nukeKills >= 75)) {
        gv_nukeAchievementTriggered = true;

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova08.sc2map/MapScript.galaxy:3297

    gv_gorgonKills += 1;
    if ((gv_gorgonKills <= 300)) {
        AchievementTermQuantityAdd(gv_pLAYER_01_USER, "Nova08_2", 1);
    }

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova08.sc2map/MapScript.galaxy:3336

    gv_yamatoKills += 1;
    if ((gv_yamatoKills <= 15)) {
        AchievementTermQuantityAdd(gv_pLAYER_01_USER, "Nova08_3", 1);
    }

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova08.sc2map/MapScript.galaxy:3379

    gv_novaKills += 1;
    if ((gv_novaKills <= 333)) {
        AchievementTermQuantityAdd(gv_pLAYER_01_USER, "Nova08_Mastery", 1);
    }

mods/novastoryassets.sc2mod/base2.sc2maps/maps/campaign/nova/nova06.sc2mapMapScript.galaxy:4968


    gv_nukeKills += 1;
    AchievementTermQuantityAdd(gv_pLAYER_01_USER, "Nova06_2", 1);
    if ((gv_nukeAchievementTriggered == false) && (gv_nukeKills >= 75)) {
        gv_nukeAchievementTriggered = true;

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova08.sc2mapMapScript.galaxy:3297

    gv_gorgonKills += 1;
    if ((gv_gorgonKills <= 300)) {
        AchievementTermQuantityAdd(gv_pLAYER_01_USER, "Nova08_2", 1);
    }

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova08.sc2mapMapScript.galaxy:3336

    gv_yamatoKills += 1;
    if ((gv_yamatoKills <= 15)) {
        AchievementTermQuantityAdd(gv_pLAYER_01_USER, "Nova08_3", 1);
    }

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova08.sc2mapMapScript.galaxy:3379

    gv_novaKills += 1;
    if ((gv_novaKills <= 333)) {
        AchievementTermQuantityAdd(gv_pLAYER_01_USER, "Nova08_Mastery", 1);
    }

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

    libNtve_gf_SendActorMessageToUnit(lp_trooper, "Signal ClearWeapon");
    libNtve_gf_SendActorMessageToUnit(lp_trooper, (("Signal " + lp_actorSignal)));
    AchievementTermQuantityAdd(UnitGetOwner(lp_trooper), "CommanderMengskWeaponPickup", 1);
}

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

        }
        if ((UnitHasBehavior2(lv_targetUnit, "SupplyLT1") == true)) {
            AchievementTermQuantityAdd(lv_dehakaPlayer, "CommanderDehakaSupply", 1);
        }
        else {

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

        }
        else {
            AchievementTermQuantityAdd(lv_dehakaPlayer, "CommanderDehakaSupply", (CatalogFieldValueGetAsInt(c_gameCatalogUnit, UnitGetType(lv_targetUnit), "Food", EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget)) * -1));
        }
        AchievementTermQuantityAdd(lv_dehakaPlayer, "CommanderDehakaDamage", FixedToInt(lv_targetLife));

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

            AchievementTermQuantityAdd(lv_dehakaPlayer, "CommanderDehakaSupply", (CatalogFieldValueGetAsInt(c_gameCatalogUnit, UnitGetType(lv_targetUnit), "Food", EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget)) * -1));
        }
        AchievementTermQuantityAdd(lv_dehakaPlayer, "CommanderDehakaDamage", FixedToInt(lv_targetLife));
        if (((UnitHasBehavior2(lv_targetUnit, "MutatorMasterController") == false) && (UnitHasBehavior2(lv_targetUnit, "MutatorJustDie") == false))) {
            UnitSetPropertyFixed(lv_targetUnit, c_unitPropLife, 1.0);

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

    }

    AchievementTermQuantityAdd(lv_killingplayer, "CommanderMengskTopBarKills", RoundI(EventUnitDamageAmount()));
    return true;
}

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

    }

    AchievementTermQuantityAdd(lv_ownercaster, "CommanderStetmannStetzone", 1);
    return true;
}

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

    libCOMI_gv_cM_Tychus_UltimatesPurchased += 1;
    if ((libNtve_gf_TriggeringProgressUpgrade() == "TychusACBandofBrothers")) {
        AchievementTermQuantityAdd(lv_player, "CommanderTychusUltimateTychus", 1);
        libCOMI_gf_CM_Tychus_UltimateTimeAchievement(lv_player);
    }

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


    if ((libNtve_gf_TriggeringProgressUpgrade() == "TychusReaperBombCharges")) {
        AchievementTermQuantityAdd(lv_player, "CommanderTychusUltimateReaper", 1);
        libCOMI_gf_CM_Tychus_UltimateTimeAchievement(lv_player);
    }

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


    if ((libNtve_gf_TriggeringProgressUpgrade() == "TychusWarhoundTurretUpgrade")) {
        AchievementTermQuantityAdd(lv_player, "CommanderTychusUltimateWarhound", 1);
        libCOMI_gf_CM_Tychus_UltimateTimeAchievement(lv_player);
    }

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


    if ((libNtve_gf_TriggeringProgressUpgrade() == "TychusFirebatShield")) {
        AchievementTermQuantityAdd(lv_player, "CommanderTychusUltimateFirebat", 1);
        libCOMI_gf_CM_Tychus_UltimateTimeAchievement(lv_player);
    }

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

    if ((lv_objectiveXP > PlayerScoreValueGetAsInt(lp_player, "BonusObjectiveXP"))) {
        lv_objectiveXPGained = (lv_objectiveXP-PlayerScoreValueGetAsInt(lp_player, "BonusObjectiveXP"));
        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus25", lv_objectiveXPGained);
        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus50", lv_objectiveXPGained);
        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus100", lv_objectiveXPGained);

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

        lv_objectiveXPGained = (lv_objectiveXP-PlayerScoreValueGetAsInt(lp_player, "BonusObjectiveXP"));
        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus25", lv_objectiveXPGained);
        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus50", lv_objectiveXPGained);
        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus100", lv_objectiveXPGained);
        if (((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 2) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 3) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 4))) {

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

        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus25", lv_objectiveXPGained);
        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus50", lv_objectiveXPGained);
        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus100", lv_objectiveXPGained);
        if (((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 2) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 3) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 4))) {
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus25", lv_objectiveXPGained);

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

        AchievementTermQuantityAdd(lp_player, "CommanderRecruitXPBonus100", lv_objectiveXPGained);
        if (((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 2) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 3) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 4))) {
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus25", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus50", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus100", lv_objectiveXPGained);

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

        if (((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 2) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 3) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 4))) {
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus25", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus50", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus100", lv_objectiveXPGained);
        }

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

            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus25", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus50", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderSoldierXPBonus100", lv_objectiveXPGained);
        }

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


        if (((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 3) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 4))) {
            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus25", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus50", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus100", lv_objectiveXPGained);

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

        if (((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 3) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 4))) {
            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus25", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus50", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus100", lv_objectiveXPGained);
        }

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

            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus25", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus50", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderVeteranXPBonus100", lv_objectiveXPGained);
        }

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


        if ((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player) == 4)) {
            AchievementTermQuantityAdd(lp_player, "CommanderCommanderXPBonus25", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderCommanderXPBonus50", lv_objectiveXPGained);
            AchievementTermQuantityAdd(lp_player, "CommanderCommanderXPBonus100", lv_objectiveXPGained);