Hello, I don’t want to annoy anyone, but I need little help.
I’m making one small game and I really don’t know, how to make stopwatch. I watched a lots of videos, but practicaly none of them wasn’t like my idea.
I wanted to make it like this:
For example: 00:00:00 (MM:SS:HS - hundredths of seconds)
Starting count from 0 (Logically.) and then stops, when reaching finish line.
I know, I did described it pretty bad, due to my bad english.
But if somebody did understand, what I mean, please help me at least a little bit.
Create a BP float variable, add Delta Time to it on every tick, then divide the result by 60 to get minutes. combine these values with the string append BP function. For the seconds, use the truncate function as we don’t want the fraction of the seconds. Now for the hundreds of seconds, simply use the fraction function. For simple testing, use the print string function. Once everything works, you can tackle the GUI part
As for stopping the watch, you can use the OnOverlap event to stop accumulating time.
Here’s a more detailed example. In addition to all this, you need to add a box collision component to your blueprint so you can actually overlap with the finish line to stop the stopwatch.
This should provide you with enough material as a starting point