# Add Charge Remaining Regen Time For Unit

Grammar — Add inVal seconds to remaining charge regen time for charge inCharge on unit inUnit
FlagsNative | Action

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

# Arguments

  • unit — Unit
  • string<charge> — Charge
  • fixed — Value

Returns — void

native void UnitAddChargeRegenRemaining(
	unit inUnit,
	string inCharge,
	fixed inVal,
);

Category: Unit / Charges And Cooldowns

# Examples

mods/heroesbrawlmods/arenamodemods/trialgrounds.stormmodbase.stormdata/LibAMVS.galaxy:868

                if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_usesCharges == true)) {
                    lv_chargeLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Charge.Link", UnitGetOwner(lp_unit));
                    UnitAddChargeRegenRemaining(lp_unit, lv_chargeLink, lv_cDRAmount);
                }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:22512


    UnitAddChargeUsed(lv_caster, "Abil/SylvanasPossession", 2.0);
    UnitAddChargeRegenRemaining(lv_caster, "Abil/SylvanasPossession", 0.0);
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:8175

            if ((libGame_gv_players[lv_heroIndex].lv_heroData.lv_abilities[lv_itAbility].lv_usesCharges == true)) {
                lv_chargeLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Charge.Link", lv_playerID);
                UnitAddChargeRegenRemaining(lp_targetUnit, lv_chargeLink, lp_cooldownChange);
            }