# Effect History Entry Effect
Grammar — Effect effect for effect history history entry index
Flags —Native
|Function
If the Effect parameter is set to Root, this will return the effect that was at the root of the effect tree for the effect that was logged in the Effect History at the specified Index. If the Effect parameter is set to Current, then this will return the effect that was logged in the Effect History at the specified Index.
# Arguments
effecthistory
— Historyint
— Indexint
<preset::EffectHistoryEffect> — Effect
Returns — string
<gamelink::Effect>
native string EffectHistoryGetEffect(
effecthistory inHistory,
int inIndex,
int inEffect,
);
# Related
Category: Effect History / Entries
- Effect History Entry Ability —
string
<gamelink::Abil> — EffectHistoryGetAbil - Effect History Entry Amount —
fixed
— EffectHistoryGetAmountFixed - Effect History Entry Amount As Integer —
int
— EffectHistoryGetAmountInt - Effect History Entry Effect —
string
<gamelink::Effect> — EffectHistoryGetEffect - Effect History Entry Time —
fixed
— EffectHistoryGetTime - Effect History Entry Type —
int
<preset::EffectHistory> — EffectHistoryGetType - Effect History Entry Unit —
unit
— EffectHistoryGetUnitByLocation - Effect History Entry Weapon —
string
<gamelink::Weapon> — EffectHistoryGetWeapon
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1905
lv_itSpecialDamageEffectEntry = 1;
for ( ; ( (autoD2EEC8FC_ai >= 0 && lv_itSpecialDamageEffectEntry <= autoD2EEC8FC_ae) || (autoD2EEC8FC_ai < 0 && lv_itSpecialDamageEffectEntry >= autoD2EEC8FC_ae) ) ; lv_itSpecialDamageEffectEntry += autoD2EEC8FC_ai ) {
if ((EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent) == libGame_gv_deathRecap_SpecialDamageEffects[lv_itSpecialDamageEffectEntry].lv_effect)) {
lv_foundSpecialDamageEffect = true;
break;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1953
lv_effectingUnit = EffectHistoryGetUnitByLocation(lv_effectHistory, lv_itEffectHistoryEntry, c_effectUnitCaster);
lv_effectingUnitType = EffectHistoryGetOriginUnitType(lv_effectHistory, lv_itEffectHistoryEntry);
if (((lv_foundSpecialDamageEffect == true) || (CatalogFieldValueGet(c_gameCatalogEffect, EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent), "SourceButtonFace", c_playerAny) == ""))) {
lv_sourceButton = null;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1957
}
else {
lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogEffect, EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent), "SourceButtonFace", c_playerAny));
}
if (((lv_effectingUnitType == null) || ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetWeapon(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry) == "")))) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1961
if (((lv_effectingUnitType == null) || ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetWeapon(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry) == "")))) {
lv_effectHistoryEntryAbility = "DebugUnknownAbility";
lv_debugString = (EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent));
if ((lv_sourceButton == null)) {
lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogAbil, lv_effectHistoryEntryAbility, "CmdButtonArray[" + IntToString(0) + "].DefaultButtonFace", c_playerAny));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:2012
}
libGame_gf_DeathRecapAddEffectInstanceForPlayer(lp_deadPlayer, EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent), lv_effectingPlayer, lv_effectHistoryEntryAbility, lv_effectingUnitType, lv_effectAmount, lv_effectAmountAttempted, lv_effectAmountShielded, (lv_effectType == c_effectHistoryHealing), lv_effectTime, lv_debugString, lv_sourceButton);
if ((libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_effectBarCount >= libGame_gv_deathRecap_MaxEffectBars_C)) {
break;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:9359
lv_dataAmountShielded = EffectHistoryGetAmountFixed(lv_history, lv_itEntry, c_effectAmountBehaviorShield, false);
lv_dataAmountInt = EffectHistoryGetAmountInt(lv_history, lv_itEntry, c_effectAmountDamaged, true);
lv_dataEffectRoot = EffectHistoryGetEffect(lv_history, lv_itEntry, c_effectHistoryEffectRoot);
lv_dataEffectCurrent = EffectHistoryGetEffect(lv_history, lv_itEntry, c_effectHistoryEffectCurrent);
lv_dataTime = EffectHistoryGetTime(lv_history, lv_itEntry);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:9360
lv_dataAmountInt = EffectHistoryGetAmountInt(lv_history, lv_itEntry, c_effectAmountDamaged, true);
lv_dataEffectRoot = EffectHistoryGetEffect(lv_history, lv_itEntry, c_effectHistoryEffectRoot);
lv_dataEffectCurrent = EffectHistoryGetEffect(lv_history, lv_itEntry, c_effectHistoryEffectCurrent);
lv_dataTime = EffectHistoryGetTime(lv_history, lv_itEntry);
lv_dataType = EffectHistoryGetType(lv_history, lv_itEntry);