How to apply gameplay effect after instigator is destroyed?

In order to use ApplyGameplayEffecToTarget, we need a source and target Ability System Component (ASC).

So imagine this scenario.

  1. Character shoots a fireball. The character is the fireball’s instigator, which it will use to get the source ASC.
  2. Character dies and is destroyed.
  3. Fireball hits target.

Now the instigator is dead, and there is no more source ASC for the fireball to reference. What do I do?

image

Is this character A shooting a fireball at character B?

Surely 3 happens before 2?

What’s an ASC?

:slight_smile:

No, I’m specifically thinking of a situation where the character who shot the fireball dies before the fireball hits anyone. Or another analogy.

  1. Soldier throws a grenade.
  2. Sniper kills Soldier before the grenade goes off.
  3. Grenade explodes, killing Sniper.

Ok no idea, sorry.

Maybe post again, and this time include the node in the original post.

If the instigator is dead then that’s it. If it’s another player character then you could perhaps pass in the player controller. It would exist even if it’s possessed pawn dies.

If it’s an AI then maybe pass in some sort of AI manager that would interpret the kill action on some meaningful way?

1 Like