# Triggering Unit Property Change (Real)

Grammar — Triggering unit property change
FlagsNative | Function

Returns the triggering unit property change in response to “Unit Property Changes” events.

Returns — fixed

native fixed EventUnitPropertyChangeFixed();

# Supported triggers

Category: Unit / Properties

# Examples

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:18157

    // Conditions
    if (testConds) {
        if (!((EventUnitPropertyChangeFixed() < 0.0))) {
            return false;
        }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:18181

        DialogControlCreateInPanelFromTemplate(libSwaC_gv_zS_SwarmHeroUIPanel[lv_index], c_triggerControlTypeImage, "HotS_GameUnitFrame/HeroEnergyBarDamageTemplate/DamageBar");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libSwaC_gv_zS_SwarmHeroUIDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libSwaC_gv_zS_SwarmHeroUIUnit[lv_index], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libSwaC_gv_zS_SwarmHeroUIUnit[lv_index], c_unitPropEnergyMax, c_unitPropCurrent)) * 224.0));
        lv_damageBarWidth = MaxI(1, lv_damageBarWidth);
        lv_damageBarHeight = DialogControlGetHeight(libSwaC_gv_zS_SwarmHeroUIDialogEnergyBarImage[lv_index], 1);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:18188

        DialogControlCreateInPanelFromTemplate(libSwaC_gv_zS_SwarmHeroUIPanel[lv_index], c_triggerControlTypeImage, "HotS_GameUnitFrame/HeroHealthBarDamageTemplate/DamageBar");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libSwaC_gv_zS_SwarmHeroUIDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libSwaC_gv_zS_SwarmHeroUIUnit[lv_index], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libSwaC_gv_zS_SwarmHeroUIUnit[lv_index], c_unitPropLifeMax, c_unitPropCurrent)) * 224.0));
        lv_damageBarWidth = MaxI(1, lv_damageBarWidth);
        lv_damageBarHeight = DialogControlGetHeight(libSwaC_gv_zS_SwarmHeroUIDialogHealthBarImage[lv_index], 1);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:9663

    // Conditions
    if (testConds) {
        if (!((EventUnitPropertyChangeFixed() < 0.0))) {
            return false;
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:9687

        DialogControlCreateInPanelFromTemplate(libVCUI_gv_pU_VoidHeroUIPanel[lv_index], c_triggerControlTypeImage, "VoidShared_StatusBarTemplates/HeroUnitFrameTemplate/HealthBarDamageImage");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libVCUI_gv_pU_VoidHeroUIDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropEnergyMax, c_unitPropCurrent)) * IntToFixed(libVCUI_gv_pUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libVCUI_gv_pU_VoidHeroUIDialogEnergyBarImage[lv_index], 1);
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:9693

        DialogControlCreateInPanelFromTemplate(libVCUI_gv_pU_VoidHeroUIPanel[lv_index], c_triggerControlTypeImage, "VoidShared_StatusBarTemplates/HeroUnitFrameTemplate/EnergyBarDamageImage");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libVCUI_gv_pU_VoidHeroUIDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropLifeMax, c_unitPropCurrent)) * IntToFixed(libVCUI_gv_pUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libVCUI_gv_pU_VoidHeroUIDialogHealthBarImage[lv_index], 1);
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:9699

        DialogControlCreateInPanelFromTemplate(libVCUI_gv_pU_VoidHeroUIPanel[lv_index], c_triggerControlTypeImage, "VoidShared_StatusBarTemplates/HeroUnitFrameTemplate/ShieldBarDamageImage");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libVCUI_gv_pU_VoidHeroUIDialogShieldBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropShields, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropShieldsMax, c_unitPropCurrent)) * IntToFixed(libVCUI_gv_pUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libVCUI_gv_pU_VoidHeroUIDialogShieldBarImage[lv_index], 1);
    }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:6803

    // Conditions
    if (testConds) {
        if (!((EventUnitPropertyChangeFixed() < 0.0))) {
            return false;
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:6827

        DialogControlCreateInPanelFromTemplate(libNCUI_gv_nU_HeroPanel[lv_index], c_triggerControlTypeImage, "VoidShared_StatusBarTemplates/HeroUnitFrameTemplate/HealthBarDamageImage");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libNCUI_gv_NU_HeroDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropEnergyMax, c_unitPropCurrent)) * IntToFixed(libNCUI_gv_nUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libNCUI_gv_NU_HeroDialogEnergyBarImage[lv_index], 1);
    }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:6833

        DialogControlCreateInPanelFromTemplate(libNCUI_gv_nU_HeroPanel[lv_index], c_triggerControlTypeImage, "VoidShared_StatusBarTemplates/HeroUnitFrameTemplate/EnergyBarDamageImage");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libNCUI_gv_NU_HeroDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropLifeMax, c_unitPropCurrent)) * IntToFixed(libNCUI_gv_nUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libNCUI_gv_NU_HeroDialogHealthBarImage[lv_index], 1);
    }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:6840

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libNCUI_gv_nU_HeroDialogShieldBarImage[lv_index], c_anchorLeft, 0, 0);
        if ((UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropShieldsMax, c_unitPropCurrent) > 0.0)) {
            lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropShields, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropShieldsMax, c_unitPropCurrent)) * IntToFixed(libNCUI_gv_nUC_HEROUIBARWIDTH)));
        }
        else {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8073

    // Conditions
    if (testConds) {
        if (!((EventUnitPropertyChangeFixed() < 0.0))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8111

        DialogControlCreateInPanelFromTemplate(libCOUI_gv_cU_HeroPanel[lv_index], c_triggerControlTypeImage, "HotS_GameUnitFrame/HeroEnergyBarDamageTemplate/DamageBar");
        DialogControlSetPositionRelative(DialogControlLastCreated(), lv_heroGroup, c_anchorLeft, libCOUI_gv_cU_HeroDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropEnergyMax, c_unitPropCurrent)) * IntToFixed(libCOUI_gv_cUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libCOUI_gv_cU_HeroDialogEnergyBarImage[lv_index], lv_player);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8117

        DialogControlCreateInPanelFromTemplate(libCOUI_gv_cU_HeroPanel[lv_index], c_triggerControlTypeImage, "HotS_GameUnitFrame/HeroHealthBarDamageTemplate/DamageBar");
        DialogControlSetPositionRelative(DialogControlLastCreated(), lv_heroGroup, c_anchorLeft, libCOUI_gv_cU_HeroDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropLifeMax, c_unitPropCurrent)) * IntToFixed(libCOUI_gv_cUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libCOUI_gv_cU_HeroDialogHealthBarImage[lv_index], lv_player);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8124

        DialogControlSetPositionRelative(DialogControlLastCreated(), lv_heroGroup, c_anchorLeft, libCOUI_gv_cU_HeroDialogShieldBarImage[lv_index], c_anchorLeft, 0, 0);
        if ((UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropShieldsMax, c_unitPropCurrent) != 0.0)) {
            lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropShields, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropShieldsMax, c_unitPropCurrent)) * IntToFixed(libCOUI_gv_cUC_HEROUIBARWIDTH)));
        }
        else {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:8540

    // Conditions
    if (testConds) {
        if (!((EventUnitPropertyChangeFixed() < 0.0))) {
            return false;
        }

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:8564

        DialogControlCreateInPanelFromTemplate(libA3DDD02B_gv_pP_HeroUIPanel[lv_index], c_triggerControlTypeImage, "VoidShared_StatusBarTemplates/HeroUnitFrameTemplate/HealthBarDamageImage");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libA3DDD02B_gv_pP_HeroUIDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropEnergyMax, c_unitPropCurrent)) * libA3DDD02B_gv_pPC_HEROUIBARWIDTH));
        lv_damageBarHeight = DialogControlGetHeight(libA3DDD02B_gv_pP_HeroUIDialogEnergyBarImage[lv_index], 1);
    }

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:8570

        DialogControlCreateInPanelFromTemplate(libA3DDD02B_gv_pP_HeroUIPanel[lv_index], c_triggerControlTypeImage, "VoidShared_StatusBarTemplates/HeroUnitFrameTemplate/EnergyBarDamageImage");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libA3DDD02B_gv_pP_HeroUIDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropLifeMax, c_unitPropCurrent)) * libA3DDD02B_gv_pPC_HEROUIBARWIDTH));
        lv_damageBarHeight = DialogControlGetHeight(libA3DDD02B_gv_pP_HeroUIDialogHealthBarImage[lv_index], 1);
    }

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:8576

        DialogControlCreateInPanelFromTemplate(libA3DDD02B_gv_pP_HeroUIPanel[lv_index], c_triggerControlTypeImage, "VoidShared_StatusBarTemplates/HeroUnitFrameTemplate/ShieldBarDamageImage");
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libA3DDD02B_gv_pP_HeroUIDialogShieldsBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropShields, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropShieldsMax, c_unitPropCurrent)) * libA3DDD02B_gv_pPC_HEROUIBARWIDTH));
        lv_damageBarHeight = DialogControlGetHeight(libA3DDD02B_gv_pP_HeroUIDialogShieldsBarImage[lv_index], 1);
    }