Height Tracker

How can I display the current player height live in Fortnite Creative or UEFN during the game? I’m looking for a way to show the player’s altitude on screen, possibly using a HUD Message Device or a similar method. Also, how can I set up a timer that tracks how long a player takes to finish a course, and how can I create a leaderboard to show the best times?

Assuming you have the Hud Message Device already referenced in the verse code to show The players altitude you can do something like this

StM<localizes>(String:string):message="{String}"
ShowAltitude(Agent:agent):void=
        if(FortCharacter:=Agent.GetFortCharacter[]):
              HudMessageDevice.Show(Agent,StM("Height {FortCharacter.GetTransform().Translation.Z}")

Whenever you call this function it will show the hud message and display their current Z coordinate which represents the altitude.

For a timer you can use the timer device to start at the bottom of the course and then finish it at the top. Creative already has a built-in leaderboard system that you can utilize to display the “Time” stat from the timer when they finish

1 Like

Hello,

For altitude I’m reminded of this tutorial from the ‘Only up’ craze. - Although I do like the simplicity of a MessageDevice based solution instead of all that widget + text block stuff.

I think the system that Mineblo is referring to is the ‘Speedway Race with Verse Persistence’ sample in the “Feature Examples” section.

I haven’t personally opened that template (Only checked the original 1.0 template before the re-work) but yea I assume it can have usefull resources in regards to the utilization of a timer device, good recommendation