# Unit Attribute Change
Grammar — u attribute points changed
Flags —Native
|Event
This event fires when a unit’s attribute points change. Use “Triggering Attribute Points” to get the number of attribute points. Use “Triggering Behavior” to get the behavior.
# Arguments
unitref
<unit> — Unit
Returns — void
native void TriggerAddEventUnitAttributeChange(
trigger t,
unitref u,
);
# Event parameters
- Triggering Behavior — EventUnitBehavior
- Triggering Attribute Points — EventUnitAttributePoints
# Related
Category: Unit / Attributes And Experience
- Unit Gains Experience —
void
— TriggerAddEventUnitGainExperience - Unit Gains Experience Level —
void
— TriggerAddEventUnitGainLevel - Unit XP Get Current XP —
fixed
— UnitXPGetCurrentXP - Unit XP Add XP —
void
— UnitXPAddXP - Unit XP Set Current XP —
void
— UnitXPSetCurrentXP - Unit XP Get XP For Level —
int
— UnitXPGetXPForLevel - Unit XP Set XP For Level —
void
— UnitXPSetXPForLevel - Unit XP Get Current Level —
int
— UnitXPGetCurrentLevel - Unit XP Set Current Level —
void
— UnitXPSetCurrentLevel - Unit XP Get Num Levels —
int
— UnitXPGetNumLevels - Triggering Experience Gained —
fixed
— EventUnitXPDelta - Unit Attribute Change —
void
— TriggerAddEventUnitAttributeChange - Triggering Attribute Points —
int
— EventUnitAttributePoints - Total Experience Of Unit —
fixed
— UnitXPTotal - Experience Level Of Unit —
int
— UnitLevel - Enable/Disable Experience Gain For Unit —
void
— UnitXPGainEnable
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:9567
libCOUI_gt_CU_StetelliteChargesChanged = TriggerCreate("libCOUI_gt_CU_StetelliteChargesChanged_Func");
TriggerEnable(libCOUI_gt_CU_StetelliteChargesChanged, false);
TriggerAddEventUnitAttributeChange(libCOUI_gt_CU_StetelliteChargesChanged, null);
}