# Add Charge Remaining Regen Time For Player
Grammar — Add inVal seconds to charge regen time remaining for charge inCharge for player inPlayer
Flags —Native
|Action
Adds to the amount of time remaining to regenerate the specified player charge link.
# Arguments
int
— Playerstring
— Chargefixed
— Value
Returns — void
native void PlayerAddChargeRegenRemaining(
int inPlayer,
string inCharge,
fixed inVal,
);
# 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:5691
// Implementation
PlayerAddChargeRegenRemaining(lp_player, lp_cooldownName, lv_intendedRegenTime);
PlayerAddChargeUsed(lp_player, lp_cooldownName, lv_intendedChargesUsed);
}
mods/starcoop/starcoop.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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);