How to subscribe to a Player's EliminatedEvent function?

Hello. How can I subscribe to EliminatedEvent so that I can call a function when a player is eliminated? Here’s what I’m trying currently:

Players := GetPlayspace().GetPlayers()
for (Player : Players):
    if (FortniteCharacter : fort_character = Player.GetFortCharacter[]):
        FortniteCharacter.EliminatedEvent.Subscribe(MyEvent)

But I get this: Unknown member Subscribe in tuple()->listenable(elimination_result).

And similarly, I’d like to subscribe to some other player related functions as well, like when they sprint, jump, etc., but I can’t subscribe to these.

I think you’re missing some brackets here:

FortniteCharacter.EliminatedEvent().Subscribe(MyEvent)

An example of this code in action would be:

Players := GetPlayspace().GetPlayers()
        for (Player : Players):
            if (FortniteCharacter : fort_character = Player.GetFortCharacter[]):
                FortniteCharacter.EliminatedEvent().Subscribe(TestEvent)

TestEvent(Elim : elimination_result) : void = 
    Print("Someone died!")
5 Likes

Huh, thank you. I’m a bit confused because although that seems obvious in hindsight, we don’t use brackets with devices’ events, for example:
PlayerSpawner.SpawnedEvent.Subscribe(OnPlayerSpawned)

2 Likes