# Unit Spends Vital

Grammaru spends vitalType
FlagsNative | Event

# Arguments

  • unitref<unit> — Unit
  • int<preset::UnitVitalType> — Vital Type

Returns — void

native void TriggerAddEventUnitSpendVital(
	unitref u,
	int vitalType,
);

Category: Unit / Combat

# Examples

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:1664

    libGAwX_gt_ManaFlareSpendMana = TriggerCreate("libGAwX_gt_ManaFlareSpendMana_Func");
    TriggerEnable(libGAwX_gt_ManaFlareSpendMana, false);
    TriggerAddEventUnitSpendVital(libGAwX_gt_ManaFlareSpendMana, null, c_unitVitalEnergy);
}