Show an ability cooldown clock that does not jump when speed-ups change
The little clock on a skill button is easy until a power-up makes cooldowns faster halfway through: then the clock jumps, the skill becomes ready too early, or the timer shows a wrong number of seconds. Here is a way to count that stays right.
Why this works
What the clock should show is how far along the wait is, not how many seconds are left, because speed-ups change the seconds but not the progress. Tracking the share done means a bonus starting or ending changes only the pace, and the display never jumps.
When not to use it
Don't use it for abilities that charge from what the player does, such as hits landed or damage taken, or for those with a fixed cooldown the player must be able to count. Show the number of charges, or a fixed countdown, there.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 26 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Show an ability cooldown clock that does not jump when speed-ups change" (read_entry ability-cooldown-clock-with-haste-changes) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP