How to get the CURRENT players position?

I am a total new to UEFN verse scripting…

I am working with the mutator device, I have seen a few examples of how to list all the players in the game using “GetPlayspace().GetPlayers()”, but, what I want is, a reference to the player who triggered say an exit event in the mutator exit event.

I have a function “OnPlayerExit” that I have subscribed to “AgentExitsEvent”, I want to know how to get the player position of the player that triggered this event, not all the players in the game, is there a way to do this?

Hi, you can do that like so:

    HandleAgent(Agent: agent):void=

        if. FortCharacter := Agent.GetFortCharacter[]
        then:
            CharacterTranslation := FortCharacter.GetTransform().Translation
            # Do something with translation
4 Likes

Thank you so much!! Maaaybe I should have just known this, ha!

1 Like