How works the elimination_result.EliminatingCharacter ?

Hi Verse Community,

I don’t know what i’m doing bad so i post here hoping i get an answer.
I have a little function that subscribe the EliminatedEvent() called OnEliminatedPlayer() and i try to get the EliminatingCharacter to do somethings with him.

Because i’m the only one who test my device, i place a damage volume to simulate elimination and see if i can access to the EliminatingCharacter or no.

The desciption of elimination_result.EliminatingCharacter say :

EliminatingCharacter<native><public>:?fort_character
# fort_character that eliminated 'EliminatedCharacter' from the match. 'EliminatingCharacter' will be false when 'EliminatedCharacter' was eliminated through non-character actions, such as environmental damage. 
///

Ok, i see, so elimination_result.EliminatingCharacter should be false if it’s not a character, right ?

Now this is my issue :

OnEliminatedPlayer(Result : elimination_result):void=
    if (AgentEliminated := Result.EliminatedCharacter.GetAgent[]): 
        if (Eliminator := Result.EliminatingCharacter?): 
            # I'm supposed to get here only if EliminatingCharacter is a FortCharacter but I get here every time i die from the damage_volume, so the damage_volume is as a FortCharacter ?
        else:
            # Do something else

i also try things like that :

OnEliminatedPlayer(Result : elimination_result):void=
    if (AgentEliminated := Result.EliminatedCharacter.GetAgent[]): 
        if (Result.EliminatingCharacter <> false): 
            # Same result here, it seems Result.EliminatingCharacter isn't false because damage_volume count as a FortCharacter ?
        else:
            # Do something else

Thanks to read this, and sorry for my approximative english, hope anyone can help me.

Same issue, did you come to a solution?

I think the damage_volume triggers a Self Elimination, so I’d say you would need to compare AgentEliminated with Result.EliminationCharacter?.GetAgent[] to work around that :+1:

Also, we can display Player names now so if you wanted to debug the agent that’s being returned you could do it (Leaderboard with Billboard - #11 by Ep8Script)

1 Like