# Charge Regen Remaining For Unit Ability

Grammar — Charge regen time remaining of charge inCharge on ability inAbil on unit inUnit
FlagsNative | Function

Returns the charge regen time remaining for the specified ability charge link.

# Arguments

  • unit — Unit
  • string<gamelink::Abil> — Ability
  • string<charge> — Charge

Returns — fixed

native fixed UnitAbilityGetChargeRegen(
	unit inUnit,
	string inAbil,
	string inCharge,
);

Category: Unit / Charges And Cooldowns

# Examples

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

    // Automatic Variable Declarations
    // Implementation
    UnitAbilityAddChargeRegen(lp_inUnit, lp_inAbil, lp_inCharge, (-1.0 * UnitAbilityGetChargeRegen(lp_inUnit, lp_inAbil, lp_inCharge)));
}

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

    // Automatic Variable Declarations
    // Implementation
    UnitAbilityAddChargeRegen(lp_inUnit, lp_inAbil, lp_inCharge, (-1.0 * UnitAbilityGetChargeRegen(lp_inUnit, lp_inAbil, lp_inCharge)));
}

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

    // Implementation
    while (true) {
        while (!(((UnitAbilityGetCooldown(lp_unit, lp_ability, lp_cooldownLink) > 20.0) || ((UnitAbilityChargeInfo(lp_unit, AbilityCommand(lp_ability, 0), c_unitAbilChargeCountLeft) == 0.0) && (UnitAbilityGetChargeRegen(lp_unit, lp_ability, lp_cooldownLink) > 20.0))))) {
            Wait(1.0, c_timeGame);
        }

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

            Wait(1.0, c_timeGame);
        }
        while (!((UnitAbilityGetCooldown(lp_unit, lp_ability, lp_cooldownLink) <= 0.0) && ((UnitAbilityGetChargeRegen(lp_unit, lp_ability, lp_cooldownLink) <= 0.0) || (UnitAbilityChargeInfo(lp_unit, AbilityCommand(lp_ability, 0), c_unitAbilChargeCountLeft) > 0.0)))) {
            Wait(1.0, c_timeGame);
        }

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

    // Implementation
    while (true) {
        while (!((libCOMI_gv_cM_HornerVOFleetOffCooldown == false) && ((UnitAbilityGetCooldown(lp_unit, lp_ability, lp_cooldownLink) > 20.0) || ((UnitAbilityChargeInfo(lp_unit, AbilityCommand(lp_ability, 0), c_unitAbilChargeCountLeft) == 0.0) && (UnitAbilityGetChargeRegen(lp_unit, lp_ability, lp_cooldownLink) > 20.0))))) {
            Wait(1.0, c_timeGame);
        }

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

            Wait(1.0, c_timeGame);
        }
        while (!((UnitAbilityGetCooldown(lp_unit, lp_ability, lp_cooldownLink) <= 0.0) && ((UnitAbilityGetChargeRegen(lp_unit, lp_ability, lp_cooldownLink) <= 0.0) || (UnitAbilityChargeInfo(lp_unit, AbilityCommand(lp_ability, 0), c_unitAbilChargeCountLeft) > 0.0)))) {
            Wait(1.0, c_timeGame);
        }