# Effect History Of Unit

Grammar — Effect History of Unit unit with maxCount entries.
FlagsNative | Function

Returns an Effect History object that can be used to inspect the history of effects for a unit. In order for a unit to register effects to its history, the unit must specify an Effect History Limit value, and any effects you want to track must specify a Caster History value. The Caster History value specifies the category under which you want to track the effect. You can use Effect History Entry Type to query the category for an Effect History entry. A max count of 0 (the default) will get all available entries.

# Arguments

  • unit — Unit
  • int — Max Count

Returns — effecthistory

native effecthistory UnitEffectHistory(
	unit inUnit,
	int inMaxCount,
);

Category: Effect History

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:1887

    lv_currentTime = GameGetMissionTime();
    libGame_gf_DeathRecapClearDeathRecapForPlayer(lp_deadPlayer);
    lv_effectHistory = UnitEffectHistory(lp_playerHero, libGame_gv_deathRecap_MaxEffectsInHistory_C);
    lv_effectHistoryCount = EffectHistoryCount(lv_effectHistory);
    libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroMaxHealth = FixedToInt(UnitGetPropertyFixed(lv_deadHeroUnit, c_unitPropLifeMax, c_unitPropCurrent));

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:9346


    lv_unit = UnitGroupUnit(UnitGroupSelected(1), 1);
    lv_history = UnitEffectHistory(lv_unit, 0);
    lv_count = EffectHistoryCount(lv_history);
    TriggerDebugOutput(1, StringExternal("Param/Value/lib_UIUI_983E27A4"), true);