hello, what i’m trying to do is create timers for interface and hidden timers to simulate alot of stuffs that relies on time…
something like…
(displayed in screen) countdown
time remaining for unit 1 : 23m 3s
time remaining for unit 2 : 23m 3s
time remaining for unit 3 : 23m 3s
time remaining for unit 4 : 23m 3s
similar to old strategy games like red alert, starcraft and warcraft…
where unit building is timed…
also similar to most mobile games where everything is timed…
it would be possible to create timer for each unit… but if i wanted 1000 units, i have to create 1000 timers…
is there anyway i can create a timer instance, where i can set input timegoal in seconds, and just triggers when time is reached?.
i tried to test a loop in create timer by function…
but it seems the timer resets everytime it is called, so the only timer that works is the last triggered timer of the last loop…
For sure, you can create a blueprint ( which would probably be a widget ) to which you can pass the name, interval and amounts. Once you’ve written this one BP, you can create instances of it with various parameters, and they will all talk to the screen independently.
Here’s a tuut on making a widget ( although he actually places a copy of the widget, you can also create them in BP ):
I will come back later with a bit of code if I have time...
Ok, some research later. Creating progress bars totally from blueprint, bit of a nightmare…
Having a progress bar manually connected to a timer, pretty easy. Another tuut here:
Having timers in the background, no problem whatsoever, they can be created using SetTimerByEvent:
Very easy to stick this in a function or whatever. Does any of this get near what you are asking?