Hello all!
So in my test FPS level, I have an pickup which is an Actor with an overlap sphere that should add 15 seconds to the level time remaining. Float variable called TimeAdd with a value of 15 is contained in the ‘pickup’ Actor, but my logic on how to add the time to the HUD is clearly faulty.
I’ve had no problems with pickups that add health or ammo, so I figured casting to the Game Mode HUD I created would suffice.
Level time remaining is a float variable stored in my Gamemode BP, the time remaining float is then formated to {minutes} and {seconds}, which then is set in the Gamemode HUD.
From there, on overlapping the ‘pickup’, I attempt to Cast to my GameMode BP, and call a custom ‘add time’ function, play a sound, and destroy the actor.
My time remaining function which counts down time in the HUD takes ‘time remaining’ float + ‘time add’ (15 seconds), then attempts to set time remaining.
The Add Time function attempts to use the format time remaining function I’ve set up previously which converts the float time remaining to {minutes} and {seconds}. (I’m not sure if this is necessary for my add time function?)
Then, referencing the HUD, and grabbing the time remaining text in the HUD, I attempt to ‘set’ it.
No compiler errors, but when walking over the overlap sphere, nothing happens in game!
Any input is appreciated