# Charge Regen Remaining For Player

Grammar — Charge regen time of charge inCharge for player inPlayer
FlagsNative | Function

Returns the charge regen time for the specified player charge link.

# Arguments

  • int — Player
  • string — Charge

Returns — fixed

native fixed PlayerGetChargeRegen(
	int inPlayer,
	string inCharge,
);

Category: Player / Charges And Cooldowns

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:3853

    // Automatic Variable Declarations
    // Implementation
    PlayerAddChargeRegen(lp_inPlayer, lp_inCharge, (-1.0 * PlayerGetChargeRegen(lp_inPlayer, lp_inCharge)));
}

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:3207

    // Automatic Variable Declarations
    // Implementation
    PlayerAddChargeRegen(lp_inPlayer, lp_inCharge, (-1.0 * PlayerGetChargeRegen(lp_inPlayer, lp_inCharge)));
}

mods/heroesdata.stormmodbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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);