# Unit Property Changes

Grammaru property changes
FlagsNative | Event

This event fires when a unit’s property changes. Use “Triggering Player” to get the owner of the unit whose property changed. Use “Triggering Unit” to get the unit whose property changed.

# Arguments

  • unitref [ unit ] — Unit
  • int [ preset::Unit_Property ] — Property

Returns — void

native void TriggerAddEventUnitProperty(
	trigger t,
	unitref u,
	int prop,
);

# Event parameters

Category: Unit / Properties

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L1245
TriggerAddEventUnitProperty(gt_UpdatePurifierBossBar, null, c_unitPropLife)
// L4419
TriggerAddEventUnitProperty(gt_OdinHealthRepaired, null, c_unitPropLife)
// L7330
TriggerAddEventUnitProperty(gt__3UpdateQueenBossyBar, null, c_unitPropLife)
// L1245
TriggerAddEventUnitProperty(gt_UpdatePurifierBossBar, null, c_unitPropLife)
// L4419
TriggerAddEventUnitProperty(gt_OdinHealthRepaired, null, c_unitPropLife)
// L7330
TriggerAddEventUnitProperty(gt__3UpdateQueenBossyBar, null, c_unitPropLife)
// L3998
TriggerAddEventUnitProperty(gt_BossDamagedBossEvents, UnitRefFromVariable("gv_tacOpsCenter"), c_unitPropLife)
// L2330
TriggerAddEventUnitProperty(gt_Hybrid03PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[3]"), c_unitPropLife)
// L2371
TriggerAddEventUnitProperty(gt_Hybrid05PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[5]"), c_unitPropLife)
// L2412
TriggerAddEventUnitProperty(gt_Hybrid06PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[6]"), c_unitPropLife)
// L2453
TriggerAddEventUnitProperty(gt_Hybrid07PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[7]"), c_unitPropLife)
// L2494
TriggerAddEventUnitProperty(gt_Hybrid08PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[8]"), c_unitPropLife)
// L1964
TriggerAddEventUnitProperty(gt_LowHealthRaynor, UnitRefFromVariable("gv_kerrigan2"), c_unitPropLife)
// L2012
TriggerAddEventUnitProperty(gt_LowHealthKerrigan, UnitRefFromVariable("gv_kerrigan"), c_unitPropLife)
// L7366
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(540)), c_unitPropLife)
// L7367
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(665)), c_unitPropLife)
// L7368
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(533)), c_unitPropLife)
// L7369
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(379)), c_unitPropLife)
// L7370
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(664)), c_unitPropLife)
// L7371
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(392)), c_unitPropLife)
// L7411
TriggerAddEventUnitProperty(gt_TramEngineUnderAttackWarning, UnitRefFromUnit(UnitFromId(540)), c_unitPropLife)
// L7412
TriggerAddEventUnitProperty(gt_TramEngineUnderAttackWarning, UnitRefFromUnit(UnitFromId(665)), c_unitPropLife)
// L4522
TriggerAddEventUnitProperty(gt__1Elevatorat75LifeQ, UnitRefFromVariable("gv__1PrisonDeckCoupling"), c_unitPropLife)
// L4571
TriggerAddEventUnitProperty(gt__1Elevatorat50LifeQ, UnitRefFromVariable("gv__1PrisonDeckCoupling"), c_unitPropLife)
// L4619
TriggerAddEventUnitProperty(gt__1Elevatorat30LifeQ, UnitRefFromVariable("gv__1PrisonDeckCoupling"), c_unitPropLife)
// L7138
TriggerAddEventUnitProperty(gt_KerriganLowestLife, UnitRefFromVariable("gv_kerrigan"), c_unitPropLife)
// L5855
TriggerAddEventUnitProperty(gt_TransmissionBrakkKillsStuffQ, UnitRefFromVariable("gv_tHE_ONE_BRAKK"), c_unitPropKills)
// L3555
TriggerAddEventUnitProperty(gt_MendTipQ, UnitRefFromVariable("gv_kerrigan"), c_unitPropLife)
// L9270
TriggerAddEventUnitProperty(gt_KerriganLifeTooLow, UnitRefFromVariable("gv_kerrigan"), c_unitPropLife)
// L2056
TriggerAddEventUnitProperty(gt_StalkerBlink01, UnitRefFromUnit(UnitFromId(95)), c_unitPropLife)
// L2056
TriggerAddEventUnitProperty(gt_StalkerBlink01, UnitRefFromUnit(UnitFromId(95)), c_unitPropLife)
// L3998
TriggerAddEventUnitProperty(gt_BossDamagedBossEvents, UnitRefFromVariable("gv_tacOpsCenter"), c_unitPropLife)
// L2330
TriggerAddEventUnitProperty(gt_Hybrid03PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[3]"), c_unitPropLife)
// L2371
TriggerAddEventUnitProperty(gt_Hybrid05PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[5]"), c_unitPropLife)
// L2412
TriggerAddEventUnitProperty(gt_Hybrid06PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[6]"), c_unitPropLife)
// L2453
TriggerAddEventUnitProperty(gt_Hybrid07PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[7]"), c_unitPropLife)
// L2494
TriggerAddEventUnitProperty(gt_Hybrid08PsychicClones, UnitRefFromVariable("gv_hybridUnitArray[8]"), c_unitPropLife)
// L1964
TriggerAddEventUnitProperty(gt_LowHealthRaynor, UnitRefFromVariable("gv_kerrigan2"), c_unitPropLife)
// L2012
TriggerAddEventUnitProperty(gt_LowHealthKerrigan, UnitRefFromVariable("gv_kerrigan"), c_unitPropLife)
// L7366
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(540)), c_unitPropLife)
// L7367
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(665)), c_unitPropLife)
// L7368
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(533)), c_unitPropLife)
// L7369
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(379)), c_unitPropLife)
// L7370
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(664)), c_unitPropLife)
// L7371
TriggerAddEventUnitProperty(gt_UpdateTramProgressBar, UnitRefFromUnit(UnitFromId(392)), c_unitPropLife)
// L7411
TriggerAddEventUnitProperty(gt_TramEngineUnderAttackWarning, UnitRefFromUnit(UnitFromId(540)), c_unitPropLife)
// L7412
TriggerAddEventUnitProperty(gt_TramEngineUnderAttackWarning, UnitRefFromUnit(UnitFromId(665)), c_unitPropLife)
// L4522
TriggerAddEventUnitProperty(gt__1Elevatorat75LifeQ, UnitRefFromVariable("gv__1PrisonDeckCoupling"), c_unitPropLife)
// L4571
TriggerAddEventUnitProperty(gt__1Elevatorat50LifeQ, UnitRefFromVariable("gv__1PrisonDeckCoupling"), c_unitPropLife)
// L4619
TriggerAddEventUnitProperty(gt__1Elevatorat30LifeQ, UnitRefFromVariable("gv__1PrisonDeckCoupling"), c_unitPropLife)
// L7138
TriggerAddEventUnitProperty(gt_KerriganLowestLife, UnitRefFromVariable("gv_kerrigan"), c_unitPropLife)
// L5855
TriggerAddEventUnitProperty(gt_TransmissionBrakkKillsStuffQ, UnitRefFromVariable("gv_tHE_ONE_BRAKK"), c_unitPropKills)
// L3555
TriggerAddEventUnitProperty(gt_MendTipQ, UnitRefFromVariable("gv_kerrigan"), c_unitPropLife)
// L9270
TriggerAddEventUnitProperty(gt_KerriganLifeTooLow, UnitRefFromVariable("gv_kerrigan"), c_unitPropLife)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L17459
TriggerAddEventUnitProperty(libSwaC_gt_ZS_KerriganLifeTooLow, UnitRefFromVariable("libSwaC_gv_zS_Kerrigan"), c_unitPropLife)
// L17996
TriggerAddEventUnitProperty(libSwaC_gt_ZS_BB_BossHPChanged, UnitRefFromVariable("libSwaC_gv_zS_BB_Boss"), c_unitPropLife)
// L17997
TriggerAddEventUnitProperty(libSwaC_gt_ZS_BB_BossHPChanged, UnitRefFromVariable("libSwaC_gv_zS_BB_Boss"), c_unitPropShields)
// L18209
TriggerAddEventUnitProperty(libSwaC_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libSwaC_gv_zS_SwarmHeroUIUnit[1]"), c_unitPropLife)
// L18210
TriggerAddEventUnitProperty(libSwaC_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libSwaC_gv_zS_SwarmHeroUIUnit[2]"), c_unitPropLife)
// L18211
TriggerAddEventUnitProperty(libSwaC_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libSwaC_gv_zS_SwarmHeroUIUnit[1]"), c_unitPropEnergy)
// L18212
TriggerAddEventUnitProperty(libSwaC_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libSwaC_gv_zS_SwarmHeroUIUnit[2]"), c_unitPropEnergy)

# campaigns/void.sc2campaign

MapScript.galaxy

// L3038
TriggerAddEventUnitProperty(gt_TransmissionCoreMatrixBadlyDamagedQ, UnitRefFromVariable("gv_purifierCoreMatrix"), c_unitPropLife)
// L3084
TriggerAddEventUnitProperty(gt_TransmissionCoreMatrixCriticallyDamagedQ, UnitRefFromVariable("gv_purifierCoreMatrix"), c_unitPropLife)
// L6802
TriggerAddEventUnitProperty(gt_TeachAstralWindQ, UnitRefFromVariable("gv_kERRIGAN"), c_unitPropLife)
// L6803
TriggerAddEventUnitProperty(gt_TeachAstralWindQ, UnitRefFromVariable("gv_aRTANIS"), c_unitPropShields)
// L3038
TriggerAddEventUnitProperty(gt_TransmissionCoreMatrixBadlyDamagedQ, UnitRefFromVariable("gv_purifierCoreMatrix"), c_unitPropLife)
// L3084
TriggerAddEventUnitProperty(gt_TransmissionCoreMatrixCriticallyDamagedQ, UnitRefFromVariable("gv_purifierCoreMatrix"), c_unitPropLife)
// L6802
TriggerAddEventUnitProperty(gt_TeachAstralWindQ, UnitRefFromVariable("gv_kERRIGAN"), c_unitPropLife)
// L6803
TriggerAddEventUnitProperty(gt_TeachAstralWindQ, UnitRefFromVariable("gv_aRTANIS"), c_unitPropShields)

# campaigns/voidstory.sc2campaign

VoidCampaignUILib.galaxy

// L9408
TriggerAddEventUnitProperty(libVCUI_gt_PU_BB_BossHPChanged, UnitRefFromVariable("libVCUI_gv_pU_BB_Boss"), c_unitPropLife)
// L9409
TriggerAddEventUnitProperty(libVCUI_gt_PU_BB_BossHPChanged, UnitRefFromVariable("libVCUI_gv_pU_BB_Boss"), c_unitPropShields)
// L9719
TriggerAddEventUnitProperty(libVCUI_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libVCUI_gv_pU_VoidHeroUIUnit[1]"), c_unitPropLife)
// L9720
TriggerAddEventUnitProperty(libVCUI_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libVCUI_gv_pU_VoidHeroUIUnit[2]"), c_unitPropLife)
// L9721
TriggerAddEventUnitProperty(libVCUI_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libVCUI_gv_pU_VoidHeroUIUnit[1]"), c_unitPropEnergy)
// L9722
TriggerAddEventUnitProperty(libVCUI_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libVCUI_gv_pU_VoidHeroUIUnit[2]"), c_unitPropEnergy)
// L9723
TriggerAddEventUnitProperty(libVCUI_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libVCUI_gv_pU_VoidHeroUIUnit[1]"), c_unitPropShields)
// L9724
TriggerAddEventUnitProperty(libVCUI_gt_ZS_SwarmHeroUIUnitVitalChange, UnitRefFromVariable("libVCUI_gv_pU_VoidHeroUIUnit[2]"), c_unitPropShields)
// L9919
TriggerAddEventUnitProperty(libVCUI_gt_PU_HealthWatchLifeCheck, UnitRefFromVariable("libVCUI_gv_pU_HealthWatchUnit[1]"), c_unitPropLife)
// L9920
TriggerAddEventUnitProperty(libVCUI_gt_PU_HealthWatchLifeCheck, UnitRefFromVariable("libVCUI_gv_pU_HealthWatchUnit[1]"), c_unitPropShields)

# mods/core.sc2mod

NativeLib.galaxy

// L6325
TriggerAddEventUnitProperty(libNtve_gt__BB_BossHPChanged, null, c_unitPropLife)
// L6326
TriggerAddEventUnitProperty(libNtve_gt__BB_BossHPChanged, null, c_unitPropShields)
// L5439
TriggerAddEventUnitProperty(libNtve_gt__BB_BossHPChanged, null, c_unitPropLife)
// L5440
TriggerAddEventUnitProperty(libNtve_gt__BB_BossHPChanged, null, c_unitPropShields)

# mods/heroes.stormmod

MapScript.galaxy

// L1385
TriggerAddEventUnitProperty(gt_HeroSafeGuard, UnitRefFromVariable("gv_heroPlayer"), c_unitPropLifePercent)
// L1386
TriggerAddEventUnitProperty(gt_HeroSafeGuard, UnitRefFromVariable("gv_heroTankDps"), c_unitPropLifePercent)
// L1387
TriggerAddEventUnitProperty(gt_HeroSafeGuard, UnitRefFromVariable("gv_heroHealerTank"), c_unitPropLifePercent)
// L2883
TriggerAddEventUnitProperty(gt_HeroSafeGuard, UnitRefFromVariable("gv_heroPlayer"), c_unitPropLifePercent)
// L1385
TriggerAddEventUnitProperty(gt_HeroSafeGuard, UnitRefFromVariable("gv_heroPlayer"), c_unitPropLifePercent)
// L1386
TriggerAddEventUnitProperty(gt_HeroSafeGuard, UnitRefFromVariable("gv_heroTankDps"), c_unitPropLifePercent)
// L1387
TriggerAddEventUnitProperty(gt_HeroSafeGuard, UnitRefFromVariable("gv_heroHealerTank"), c_unitPropLifePercent)
// L2883
TriggerAddEventUnitProperty(gt_HeroSafeGuard, UnitRefFromVariable("gv_heroPlayer"), c_unitPropLifePercent)

# mods/heroesdata.stormmod

GameLib.galaxy

// L19622
TriggerAddEventUnitProperty(libGame_gt_HeroXPChanges, null, c_unitPropXP)

# mods/heromods/samuro.stormmod

LibHSAM.galaxy

// L2204
TriggerAddEventUnitProperty(libHSAM_gt_SamuroMirrorImageHealthTrackerUpdate, null, c_unitPropLife)

# mods/missionpacks/novacampaign.sc2mod

LibNCUI.galaxy

// L6642
TriggerAddEventUnitProperty(libNCUI_gt_NU_BB_BossHPChanged, UnitRefFromVariable("libNCUI_gv_NU_BB_Boss"), c_unitPropLife)
// L6643
TriggerAddEventUnitProperty(libNCUI_gt_NU_BB_BossHPChanged, UnitRefFromVariable("libNCUI_gv_NU_BB_Boss"), c_unitPropShields)
// L6864
TriggerAddEventUnitProperty(libNCUI_gt_NU_HeroUnitVitalChange, UnitRefFromVariable("libNCUI_gv_NU_HeroUnit[1]"), c_unitPropLife)
// L6865
TriggerAddEventUnitProperty(libNCUI_gt_NU_HeroUnitVitalChange, UnitRefFromVariable("libNCUI_gv_NU_HeroUnit[2]"), c_unitPropLife)
// L6866
TriggerAddEventUnitProperty(libNCUI_gt_NU_HeroUnitVitalChange, UnitRefFromVariable("libNCUI_gv_NU_HeroUnit[1]"), c_unitPropEnergy)
// L6867
TriggerAddEventUnitProperty(libNCUI_gt_NU_HeroUnitVitalChange, UnitRefFromVariable("libNCUI_gv_NU_HeroUnit[2]"), c_unitPropEnergy)
// L6868
TriggerAddEventUnitProperty(libNCUI_gt_NU_HeroUnitVitalChange, UnitRefFromVariable("libNCUI_gv_NU_HeroUnit[1]"), c_unitPropShields)