# Charge Used For Unit Ability

Grammar — Charges used of charge inCharge on ability inAbil on unit inUnit
FlagsNative | Function

Returns the number of charges used for the specified ability charge link.

# Arguments

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

Returns — fixed

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

Category: Unit / Charges And Cooldowns

# Examples

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

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

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

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