Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Devices
Summary
For a “time trial” use case, a Timer Device can be configured to count up.
If the timer is reset and re-started, e.g. the player decides to “retry” a mini-game, the on-screen HUD will indicate the timer has started from zero again, but any calls to GetActiveDuration() will continue to accumulate time from before the reset.
Steps to Reproduce
Add a timer to an island, configured for:
Count Down Direction: “Count Up”
Applies To: Everyone
Show on HUD: True
Use Persistence: False
Lap Time Style: Time Elapsed
In Verse:
@editable
LapTimer : timer_device = timer_device{}
OnBegin():void=
LapTimer.Start()
Print(“Started Timer”)
Sleep(2.0)
Print(“Elapsed Time: {LapTimer.GetActiveDuration()}”)
LapTimer.Reset()
LapTimer.Start()
Sleep(1.0)
Print(“Elapsed Time: {LapTimer.GetActiveDuration()}”)
Expected Result
In the above example, the second GetActiveDuration() should return a smaller value than the first.
Observed Result
In the above example, the second GetActiveDuration() returns a bigger value than the first. This is also true if querying per-agent even though the players’ HUDs reflect the reset.
Platform(s)
Windows 11, PS5