# Effect History Entry Ability
Grammar — Ability for effect history history entry index
Flags —Native
|Function
Returns the ability that originated the effect that was logged in the Effect History at the specified Index. If the effect came from a weapon rather than an ability, this will return No Game Link.
# Arguments
effecthistory
— Historyint
— Index
Returns — string
<gamelink::Abil>
native string EffectHistoryGetAbil(
effecthistory inHistory,
int inIndex,
);
# 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:1914
if ((lv_foundSpecialDamageEffect == true)) {
lv_effectTypePreset = c_effectAmountDamaged;
lv_specialDamageEffectAbilityLink = EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry);
lv_effectAmount = FixedToInt(CatalogFieldValueGetAsFixed(c_gameCatalogAbil, lv_specialDamageEffectAbilityLink, "Cost.Vital[" + IntToString(0) + "]", lv_effectingPlayer));
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1959
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) == "")))) {
lv_effectHistoryEntryAbility = "DebugUnknownAbility";
lv_debugString = (EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1984
}
if ((EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry) != "") && ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) == "") || (CatalogFieldValueGet(c_gameCatalogBehavior, EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry), "Face", c_playerAny) != ""))) {
lv_effectHistoryEntryBehavior = EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry);
if ((lv_sourceButton == null)) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1992
}
else {
if ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) != "")) {
lv_effectHistoryEntryAbility = EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1993
else {
if ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) != "")) {
lv_effectHistoryEntryAbility = EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry);
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:9353
lv_itEntry = 1;
for ( ; ( (autoAAD5E102_ai >= 0 && lv_itEntry <= autoAAD5E102_ae) || (autoAAD5E102_ai < 0 && lv_itEntry >= autoAAD5E102_ae) ) ; lv_itEntry += autoAAD5E102_ai ) {
lv_dataAbility = EffectHistoryGetAbil(lv_history, lv_itEntry);
lv_dataBehavior = EffectHistoryGetSourceBehavior(lv_history, lv_itEntry);
lv_dataAmount = EffectHistoryGetAmountFixed(lv_history, lv_itEntry, c_effectAmountDamaged, false);