# Add Charge Remaining Regen Time For Player

Grammar — Add inVal seconds to charge regen time remaining for charge inCharge for player inPlayer
FlagsNative | Action

Adds to the amount of time remaining to regenerate the specified player charge link.

# Arguments

  • int — Player
  • string — Charge
  • fixed — Value

Returns — void

native void PlayerAddChargeRegenRemaining(
	int inPlayer,
	string inCharge,
	fixed inVal,
);

Category: Player / Charges And Cooldowns

# Examples

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


    // Implementation
    PlayerAddChargeRegenRemaining(lp_player, lp_cooldownName, lv_intendedRegenTime);
    PlayerAddChargeUsed(lp_player, lp_cooldownName, lv_intendedChargesUsed);
}

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

        lv_newmaxcharges = RoundI(libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "DeployPowerTowerStetmann", "InfoArray[" + IntToString(libCOMI_gv_cM_Stetmann_StetelliteChargesLevel) + "].Charge.CountMax", lp_player));
        PlayerAddChargeUsed(lp_player, "Abil/DeployPowerTowerStetmann", (lv_newmaxcharges - lv_oldmaxcharges));
        PlayerAddChargeRegenRemaining(lp_player, "Abil/DeployPowerTowerStetmann", 0.0);
    }

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

    // Implementation
    PlayerAddChargeUsed(lp_player, "Abil/SIStukovInfestStructureUpgraded", 3.0);
    PlayerAddChargeRegenRemaining(lp_player, "Abil/SIStukovInfestStructureUpgraded", lv_initialCoolup);
    Wait(lv_initialCoolup, c_timeGame);
    libNtve_gf_PlayerRemoveChargeUsed(lp_player, "Abil/SIStukovInfestStructureUpgraded");

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

    libNtve_gf_PlayerRemoveChargeUsed(lp_player, "Abil/SIStukovInfestStructureUpgraded");
    PlayerAddChargeUsed(lp_player, "Abil/SIStukovInfestStructureUpgraded", 2.0);
    PlayerAddChargeRegenRemaining(lp_player, "Abil/SIStukovInfestStructureUpgraded", lv_cooldown);
    return true;
}

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

        lv_dehakaNydusDestroyerTopBarCharges = PlayerGetChargeUsed(lv_player, "Abil/DehakaNydusDestroyerTopBar");
        PlayerAddChargeUsed(lv_player, "Abil/DehakaNydusDestroyerTopBar", (3.0 - lv_dehakaNydusDestroyerTopBarCharges));
        PlayerAddChargeRegenRemaining(lv_player, "Abil/DehakaNydusDestroyerTopBar", (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "DehakaNydusDestroyerTopBar", "InfoArray[" + IntToString(0) + "].Charge.TimeStart", lv_player) - lv_dehakaNydusDestroyerTopBarCooldown));
    }

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

    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");
    lv_hHStarportTrainVikingCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainViking");

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

    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");
    lv_hHStarportTrainBattlecruiserCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainBattlecruiser");

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

    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");
    lv_hHStarportTrainRavenCharges = PlayerGetChargeUsed(lv_player, "HHStarportTrainRaven");

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

    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);
    UnitBehaviorRemove(lv_starport, "PermanentlyUncommandable", 1);