# Remove Charge Used For Player

Grammar — Clear charges used for charge inCharge for player inPlayer
FlagsAction

Clears the number of used charges for the specified player charge link.

# Arguments

  • int — Player
  • string — Charge

Returns — void

void libNtve_gf_PlayerRemoveChargeUsed(
	int lp_inPlayer,
	string lp_inCharge,
);

Category: Player / Charges And Cooldowns

# Examples

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

    PlayerAddChargeRegenRemaining(lp_player, "Abil/SIStukovInfestStructureUpgraded", lv_initialCoolup);
    Wait(lv_initialCoolup, c_timeGame);
    libNtve_gf_PlayerRemoveChargeUsed(lp_player, "Abil/SIStukovInfestStructureUpgraded");
    PlayerAddChargeUsed(lp_player, "Abil/SIStukovInfestStructureUpgraded", 2.0);
    PlayerAddChargeRegenRemaining(lp_player, "Abil/SIStukovInfestStructureUpgraded", lv_cooldown);

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

    }
    else if (auto864A12EB_val == "Nova") {
        libNtve_gf_PlayerRemoveChargeUsed(EventPlayer(), "Abil/NovaDefensiveMatrixDrone");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "NovaGriffinBombingRunActivate", "Abil/NovaGriffinBombingRunActivate");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "NovaGriffinTransportLoadUnits", "Abil/NovaGriffinTransportLoadUnits");

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

    }
    else if (auto864A12EB_val == "Abathur") {
        libNtve_gf_PlayerRemoveChargeUsed(EventPlayer(), "Abil/ToxicNestBuild");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "AbathurMend", "Abil/AbathurMend");
        libNtve_gf_UnitAbilityRemoveChargeUsed(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "AbathurMend", "Abil/AbathurMend");

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

    UnitBehaviorAddPlayer(lv_starport, "PermanentlyUncommandable", lv_player, 1);
    UnitBehaviorAddPlayer(lv_starport, "PermanentlyInvulnerable", lv_player, 1);
    libNtve_gf_PlayerRemoveChargeUsed(lv_player, "HHStarportTrainWraith");
    lv_hHStarportTrainWraithCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainWraith");
    PlayerAddChargeUsed(lv_player, "HHStarportTrainWraith", (5.0 - lv_hHStarportTrainWraithCharges));

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

    lv_hHStarportTrainWraithCooldown = PlayerGetChargeRegen(lv_player, "HHStarportTrainWraith");
    PlayerAddChargeRegenRemaining(lv_player, "HHStarportTrainWraith", (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "HHStarportTrainHorner", "InfoArray[" + IntToString(0) + "].Charge.TimeStart", lv_player) - lv_hHStarportTrainWraithCooldown));
    libNtve_gf_PlayerRemoveChargeUsed(lv_player, "HHStarportTrainViking");
    lv_hHStarportTrainVikingCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainViking");
    PlayerAddChargeUsed(lv_player, "HHStarportTrainViking", (5.0 - lv_hHStarportTrainVikingCharges));

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

    lv_hHStarportTrainVikingCooldown = PlayerGetChargeRegen(lv_player, "HHStarportTrainViking");
    PlayerAddChargeRegenRemaining(lv_player, "HHStarportTrainViking", (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "HHStarportTrainHorner", "InfoArray[" + IntToString(1) + "].Charge.TimeStart", lv_player) - lv_hHStarportTrainVikingCooldown));
    libNtve_gf_PlayerRemoveChargeUsed(lv_player, "HHStarportTrainBattlecruiser");
    lv_hHStarportTrainBattlecruiserCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainBattlecruiser");
    PlayerAddChargeUsed(lv_player, "HHStarportTrainBattlecruiser", (5.0 - lv_hHStarportTrainBattlecruiserCharges));

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

    lv_hHStarportTrainBattlecruiserCooldown = PlayerGetChargeRegen(lv_player, "HHStarportTrainBattlecruiser");
    PlayerAddChargeRegenRemaining(lv_player, "HHStarportTrainBattlecruiser", (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "HHStarportTrainHorner", "InfoArray[" + IntToString(2) + "].Charge.TimeStart", lv_player) - lv_hHStarportTrainBattlecruiserCooldown));
    libNtve_gf_PlayerRemoveChargeUsed(lv_player, "HHStarportTrainRaven");
    lv_hHStarportTrainRavenCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainRaven");
    PlayerAddChargeUsed(lv_player, "HHStarportTrainRaven", (5.0 - lv_hHStarportTrainRavenCharges));

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


    libCOMI_gf_ApplyTychusMaxChargesPerk(EventPlayer());
    libNtve_gf_PlayerRemoveChargeUsed(EventPlayer(), "Abil/TychusTrain");
    return true;
}