- Is there anyway to speed up “set timer by function name” during the function is already called?
- Like when the “wait time” is already set at 3 second, can it be speed up after 1 second has passed?
===Reason for this requirement===
- Trying to create a Character cool down timer for next action like a strategy game, but I want to implement a magic like “haste” so that the Character timer require less time before the cool down finishes it’s time (i.e. not 3 second, but faster time during the cool down is progressing)
- I thought I can change the “set function by name” input “time” different after the “haste” magic is called, but that will only change the next cool down time and it does not affect the current cool down time.
- I also tried to use the “tick” to achieve this way, but I got issue with the “tick” is hard to give me the exact “second” when it is operating. (e.g. When I run the project via “New Editor Window” and “Standalone game” the tick speed is different)
- Please share if anyone knows a good way to change the speed of a cool down timer during the cool down period, and also it can be easily managed and controlled in seconds.
- Any idea or thought will be great
Call the timer again with a new time value, as in the timer’s tooltip. As in:
- your timer lasts 10s
- call it after 5s and tell it to finish in 2s
- it will finish in 2s
You’ve hasted the timer by 3s.
Thank you for your advice!! It opened a new mind field for me!
I just thought about and found in that case once the new timer is called with the new value, my progress bar will also be set to the new value, so the progress bar start from beginning again.
I was thinking like classic Final Fantasy ATB bar, where once the magic “haste” is cast to the player, the existing ATB bar will increase it’s speed rather than start from beginning and finishes quickly.
It does solve the faster cool down, but it does not resolve the issue entirely I think?
I was thinking like classic Final
Fantasy ATB bar, where once the magic
“haste” is cast to the player, the
existing ATB bar will increase it’s
speed rather than start from beginning
and finishes quickly.
Sadly, I’m unfamiliar with the above-mentioned functionality but consider the following, perhaps it will push you in the right direction:
The top bit is my Timer, it will expire in 10s if I leave it alone and fire the Custom Event printing Outta Time!. But every time I click the Make Haste button, 2s is shaved off and the Timer is restarted with a new value.
The bottom part is Tick updating the progress bar. We interpolate a value to make the progress bar move smoothly (since we’ll be shaving off a big chunk equal to 2s!) and Map Range the remaining time onto the original length in order to achieve a sense of continuity as the bar depletes:
Thank you so much for the idea and explanation!! It definitely helps with goal I am trying to achieve as well!
I will study this and see how it should be implemented to the project!