x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I smooth count down progress bar?

Hey,

I'm trying to create a countdown progress bar which starts at 1 and finishes at 0.

I've figured out how to get the seconds and minutes and I'm passing this through the HUD widget and doing a simple match to covert it between 0 and 1. I've also got this working a progress bar which goes down in line with the time left. However, the issues I'm having is that when the time goes down (second by second) the progress bar's movement reflect the seconds, so its quite jagged. Is it possible to have a smooth transition between the seconds.

Below is the blueprint of the HUG function which binds the time to the progress bar. alt text

One way I thought of was to bring in milliseconds? but I'm unsure if this is the right way.

Disclaimer, I'm a beginner :)

Thank you :)

Product Version: UE 4.17
Tags:
image-384.png (94.1 kB)
more ▼

asked Oct 20 '17 at 07:48 AM in Blueprint Scripting

avatar image

krishcrush_
67 2 7 9

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

You can try to convert your time to a float. Let's say you want a Countdown of 5 seconds. Your starting float is 100. Let's assume that we have a Framerate of 60. Then you Need to substract 100/300 seconds are 0.333 every Frame. I know this is only a quick test. But i am not on my Computer, so i can't try it for myself. But you can try this. Of Course if you have another framerate you Need to multiply with Delta seconds...if i am right.

more ▼

answered Oct 20 '17 at 08:05 AM

avatar image

Beregron
318 8 12 19

(comments are locked)
10|2000 characters needed characters left

Thanks Beregron.

it looks like my time system was convoluted. I found a simpler solution by using the 'set timer' functionality:

https://www.youtube.com/watch?time_continue=145&v=_uA5HbYeqGA

Thanks for your help anyway.

Cheers,

more ▼

answered Oct 20 '17 at 11:58 AM

avatar image

krishcrush_
67 2 7 9

avatar image 13xMASTERx13 Oct 27 '18 at 05:34 PM

Thank you!

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question