I am currently stuck in my work. I am working on a project and am trying to have a clock run at the top middle of the screen, very Crazy Taxi-esqe. However, I am somewhat new to blueprint and haven’t found a good way to accomplish this yet. It’s been two days and I figured I would ask the question because I know people are here to help!
This should be something easily accomplished with the UMG. You could setup a timer in your game mode and then have it relay the variable for the clock to a display in your HUD.
Check out the UMG and tutorials, there are a few on youtube and of course the learn/documentation on the launcher.
Sorry for the late response, hope you will see this.
I understand the first part of your blueprint. I got the custom event but what did you link it to? Typed in Set but was stuck. I know its probably simple to you but for someone who just started, you are a lifesaver if you could explain the set. Is it an integer?
Im confused on how it isn’t showing a variable for you under the set current time left unless I’m wrong in my assumption it is a new variable.
The TIMER is firing off the custom event UPDATECLOCK.
You should use a float as the variable but you could use int just less precision.
this sequence he has posted will only run a the float CurrentTimeLeft down by 1 every loop that the timer fires off.
So here’s what is happening
Event begin play starts the timer
Timer calls the custom event UpdateClock
UpdateClock then subtracts 1 from the CurrentTimeLeft (note you have to set a default value for this variable to the amount of seconds you would want)
To display this value you could either add a PRINT STRING behind the CurrentTimeLeft SET node and then plug the CurrentTimeLeft Get node into it, make a Text Display object or setup a display in the HUD using canvas or UMG.