# Remove Charge Used For Player
Grammar — Clear charges used for charge inCharge for player inPlayer
Flags —Action
Clears the number of used charges for the specified player charge link.
# Arguments
int
— Playerstring
— Charge
Returns — void
void libNtve_gf_PlayerRemoveChargeUsed(
int lp_inPlayer,
string lp_inCharge,
);
# Related
Category: Player / Charges And Cooldowns
- Add Charge Remaining Regen Time For Player —
void
— PlayerAddChargeRegenRemaining - Add Charge Full Regen Time For Player —
void
— PlayerAddChargeRegenFull - Add Charge Used For Player —
void
— PlayerAddChargeUsed - Remove Charge Used For Player —
void
— libNtve_gf_PlayerRemoveChargeUsed - Charge Regen Remaining For Player —
fixed
— PlayerGetChargeRegen - Charge Regen Full For Player —
fixed
— PlayerGetChargeRegenFull - Player Charge Used —
fixed
— PlayerGetChargeUsed - Pause/Unpause All Charges For Player —
void
— PlayerPauseAllCharges - Add Cooldown For Player —
void
— PlayerAddCooldown - Remove Cooldown For Player —
void
— libNtve_gf_PlayerRemoveCooldown - Player Cooldown —
fixed
— PlayerGetCooldown - Pause/Unpause All Cooldowns For Player —
void
— PlayerPauseAllCooldowns
# Examples
mods/starcoop/starcoop.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.sc2data/LibCOUI.galaxy:8851
libCOMI_gf_ApplyTychusMaxChargesPerk(EventPlayer());
libNtve_gf_PlayerRemoveChargeUsed(EventPlayer(), "Abil/TychusTrain");
return true;
}