# Charge Regen Remaining For Player
Grammar — Charge regen time of charge inCharge for player inPlayer
Flags —Native
|Function
Returns the charge regen time for the specified player charge link.
# Arguments
int
— Playerstring
— Charge
Returns — fixed
native fixed PlayerGetChargeRegen(
int inPlayer,
string 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/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:3853
// Automatic Variable Declarations
// Implementation
PlayerAddChargeRegen(lp_inPlayer, lp_inCharge, (-1.0 * PlayerGetChargeRegen(lp_inPlayer, lp_inCharge)));
}
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:3207
// Automatic Variable Declarations
// Implementation
PlayerAddChargeRegen(lp_inPlayer, lp_inCharge, (-1.0 * PlayerGetChargeRegen(lp_inPlayer, lp_inCharge)));
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:6869
lv_chargesUsed = PlayerGetChargeUsed(lp_player, lv_chargeLink);
if ((lv_chargesUsed >= IntToFixed(lv_chargesMax))) {
lv_cooldownTime = PlayerGetChargeRegen(lp_player, lv_chargeLink);
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5685
// Automatic Variable Declarations
// Variable Initialization
lv_currentRegenTime = PlayerGetChargeRegen(lp_player, lp_cooldownName);
lv_currentChargesUsed = PlayerGetChargeUsed(lp_player, lp_cooldownName);
lv_intendedChargesUsed = (lp_maxChargeCount - lv_currentChargesUsed - 1.0);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:17094
libCOMI_gv_cM_DehakaBossBuildingBuilt_Glevig[lv_player] = true;
PlayerAddCooldown(lv_player, "Abil/DehakaGlevigTopBar", 120.0);
lv_dehakaNydusDestroyerTopBarCooldown = PlayerGetChargeRegen(lv_player, "Abil/DehakaNydusDestroyerTopBar");
lv_dehakaNydusDestroyerTopBarCharges = PlayerGetChargeUsed(lv_player, "Abil/DehakaNydusDestroyerTopBar");
PlayerAddChargeUsed(lv_player, "Abil/DehakaNydusDestroyerTopBar", (3.0 - lv_dehakaNydusDestroyerTopBarCharges));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:20170
lv_hHStarportTrainWraithCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainWraith");
PlayerAddChargeUsed(lv_player, "HHStarportTrainWraith", (5.0 - lv_hHStarportTrainWraithCharges));
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");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:20175
lv_hHStarportTrainVikingCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainViking");
PlayerAddChargeUsed(lv_player, "HHStarportTrainViking", (5.0 - lv_hHStarportTrainVikingCharges));
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");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:20180
lv_hHStarportTrainBattlecruiserCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainBattlecruiser");
PlayerAddChargeUsed(lv_player, "HHStarportTrainBattlecruiser", (5.0 - lv_hHStarportTrainBattlecruiserCharges));
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");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:20185
lv_hHStarportTrainRavenCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainRaven");
PlayerAddChargeUsed(lv_player, "HHStarportTrainRaven", (5.0 - lv_hHStarportTrainRavenCharges));
lv_hHStarportTrainRavenCooldown = PlayerGetChargeRegen(lv_player, "HHStarportTrainRaven");
PlayerAddChargeRegenRemaining(lv_player, "HHStarportTrainRaven", (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "HHStarportTrainHorner", "InfoArray[" + IntToString(3) + "].Charge.TimeStart", lv_player) - lv_hHStarportTrainRavenCooldown));
Wait(5.4, c_timeGame);