Why is the value going to "-0.1" on a <= branch?

Hello,
how can i fix this issue so the value goes to 0.0 and not to -0.1 ?

Thank you, i did something different now. The time is updated by “Tick Event” not by this loop itself.
Now i got another problem. I’m using a delay to be very precise with the time and i was right. 1 - 0.1 each 100ms won’t take 1s to get it to 0 but more. The delay node enables the skill faster than the “counter” is showing. I want to make a text going from “XY Float” down to “0” as Time. is there something excluding this delay node with 0.1 ?

I did something like Branch (False) → Delay 2s → bool (True) = skill ready to use again.
The loop is subtracting 0.1 each 0.1s (100ms) from the variable (2). So it should take 2s to get the variable to 0 but when the Text says 0.4s the skill is ready to use, this “bug?” is even higher while doing this with -0.01 each 0.01s (10ms). Will result with about 1.3s showing and the skill is ready.

So the Delay node works precisely but this loop don’t so how do i make a text to show the precise time like in the delay node?

I’m assuming you want to create a cooldown, correct? If that’s the case then on your False branch, you are currently doing this:

If SkillHealTimeLive is less than or equal to 0, subtract 0.1

In other words, you are subtracting 0.1 when the value is 0. Instead you should do this:

If SkillHealTimeLive is greater than or equal to 0.1, subtract 0.1

This way it will reach 0 and stop executing.

Hope that helps!

You could always use the Clamp or Max node just before the set value node to make sure your value stays within a certain range.

Try setting this up:

This way you avoid any issues with the delay node, and will automatically reset to 0 when it completes.

Each tick can vary in length, which is likely why it was hitting 0.4 and stopping. Doing it this way will be much more accurate.

Yes, one tick is one frame. How long it takes to create that frame is dependent on PC Performance.

It might take 10ms on one computer, another slower PC could take 15ms per frame, but both are both equal to one tick.

DeltaTime is always the amount of time elapsed since the last Tick event.

So you say that 1 Tick = 1 frame ?

Oh i see now, Event Tick = Visual stuff like health bars etc, delta seconds = important stuff, bullet speed ? timers etc right ?

I got this, this isn’t based on tick but just… ohhh i see… the delay might cause some “lag” ohhhhhh :smiley:

What do you mean exacly by “Amount” in the cooldown event?

This is my “main” cooldown function for that skill.

I just randomly tried out

Event Tick is the “visual update” so i pinned my “Set (variable)” to it.

The Delta Seconds is the “time between updates” that i need to subtract from the Value to get the current time left :slight_smile:

242097-works.png

Right! I use the Tick event to fire off anything time related. By creating a custom event you can call it whenever enough time has elapsed.

Delay can be useful in certain situations, but I tend to avoid unless I have no other choice. For gameplay that need to occur on a set time scale, Tick is usually the best choice