# Does the damage\_result instigator or source even work??

**URL:** <https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [September 6, 2023, 5:04am UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499 "2023-09-06T05:04:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![GraemeBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graemebb/32/1106150_2.png) [@GraemeBB](https://forums.unrealengine.com/u/GraemeBB)\
**Post date:** [September 6, 2023, 5:04am UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/1 "2023-09-06T05:04:29Z")

</div>

This is what is in the code for damage\_result

```auto

damage_result<native><public> := struct<epic_internal>:
        # Object that was damaged.
        Target<native><public>:damageable

        # Amount of damage applied to `Target`.
        Amount<native><public>:float

        # Player, agent, etc. that instigated the damage to `Target`. Can be false when damage is instigated by code, the environment, etc.
        Instigator<native><public>:?game_action_instigator = external {}

        # Player, weapon, vehicle, etc. that damaged `Target`. Can be false when damage is caused by code, the environment, etc.
        Source<native><public>:?game_action_causer = external {}

```

But there doesn’t seem to be any way to extract anything from the Instigator or Source even when trying to typecast it to agent or player, it just fails. How can we tell what did the damage?

At least the amount works… but the rest needs to work too!

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [September 6, 2023, 5:07pm UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/2 "2023-09-06T17:07:17Z")

</div>

Did you try casting to `fort_character` ?

---

<div class="post-metadata">

**Author:** ![GraemeBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graemebb/32/1106150_2.png) [@GraemeBB](https://forums.unrealengine.com/u/GraemeBB)\
**Post date:** [September 6, 2023, 6:31pm UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/3 "2023-09-06T18:31:49Z")

</div>

yes, there seems to be nothing in those objects as far as I can tell

Tried casting to player, agent and fort\_character (as you posted in your response on the other thread)

---

<div class="post-metadata">

**Author:** ![Twin01](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/twin01/32/1077777_2.png) [@Twin01](https://forums.unrealengine.com/u/Twin01)\
**Post date:** [September 6, 2023, 6:56pm UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/4 "2023-09-06T18:56:39Z")

</div>

Did this to get an instigator of damage against a creature and it worked for a player. Not sure how I would go about doing it for the storm (especially because it will award elims to players that last damaged someone died in the storm etc).

```auto
    OnDamaged(Result:damage_result): void =
        MaybeInstigator := Result.Instigator
        if (Instigator := MaybeInstigator?):
            if (InstagatingAgent := Instigator.GetInstigatorAgent[]):
                ItemGranter.GrantItem(InstagatingAgent)

```

---

<div class="post-metadata">

**Author:** ![GraemeBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graemebb/32/1106150_2.png) [@GraemeBB](https://forums.unrealengine.com/u/GraemeBB)\
**Post date:** [September 6, 2023, 6:57pm UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/5 "2023-09-06T18:57:33Z")

</div>

GetInstigatorAgent??? how do you find these things… ok, I’ll give that a go. Thank you for popping in to help

---

<div class="post-metadata">

**Author:** ![GraemeBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graemebb/32/1106150_2.png) [@GraemeBB](https://forums.unrealengine.com/u/GraemeBB)\
**Post date:** [September 6, 2023, 7:11pm UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/6 "2023-09-06T19:11:16Z")

</div>

It seems to give a fort character no matter what. Storm damage, AI damage… everything seems to be a fort character in the instigator…

---

<div class="post-metadata">

**Author:** ![GraemeBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graemebb/32/1106150_2.png) [@GraemeBB](https://forums.unrealengine.com/u/GraemeBB)\
**Post date:** [September 6, 2023, 7:12pm UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/7 "2023-09-06T19:12:05Z")

</div>

```auto
MaybeInstigator := d.Instigator
        if (Instigator := MaybeInstigator?):
            if (InstagatingAgent := Instigator.GetInstigatorAgent[]):
                Print("this is an actual player shooting us?")
                if(IFC:fort_character = InstagatingAgent.GetFortCharacter[]):
                    Print("found the character")
                    IFC.SetHealth(50.0)

```

This sets the health of the player getting hit, to 50 if in the storm

---

<div class="post-metadata">

**Author:** ![DustinREDGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dustinredgames/32/634988_2.png) [@DustinREDGames](https://forums.unrealengine.com/u/DustinREDGames)\
**Post date:** [September 6, 2023, 7:13pm UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/8 "2023-09-06T19:13:22Z")

</div>

In Visual Studio, you can ctrl + click on any Verse device/property/method and it will open up the Verse digests API. This is where you can see a list of all Verse device API calls with comments. Also in the VS explorer panel you can see the other Unreal/Fortnite digest APIs.

![Screenshot (247)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/d/60d5b3119a45858142d49d1f163603b59489380c.png)

 ![Screenshot (248)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/0/0200e417e3b3603a82c0ddbd97155548331b4560.png)

---

<div class="post-metadata">

**Author:** ![GraemeBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graemebb/32/1106150_2.png) [@GraemeBB](https://forums.unrealengine.com/u/GraemeBB)\
**Post date:** [September 6, 2023, 7:42pm UTC](https://forums.unrealengine.com/t/does-the-damage-result-instigator-or-source-even-work/1284499/9 "2023-09-06T19:42:43Z")

</div>

ahhh… right!
