#How to make a cooldown for a skill button UI on an item by using Component.

1 messages · Page 1 of 1 (latest)

jade schooner
#

It should work like this: When u use Skill button for "Item 1" Button text starts countdown from X seconds and when u select "Item 2" There will be no countdown but when u select "Item 1" countdown still going. It's my best to explain my requrst

jade schooner
#

<@&1050648858243379231>

amber inlet
#

Now in the custom comp on the events tab select when starting and do
Infinite loop
Keep wait until cooldown ≠ 0
Keep loop until cooldown ≤ 0
Set cooldown - (0.6 x system.game.frame interval time) [this is just to delta time the cooldown]

jade schooner
amber inlet
#

all on button

jade schooner
#

"ZSCD" = Z SKILL COOLDOWN . This comp has at each item. So when you tap the button it makes the ZSCD = X. And it works the countdown works. But when we switch the item the another item has it's own countdown but when you switch it again the countdown resets.

amber inlet
#

to fix this, either use player variables or map variables since those stay forever
and there's third option to not use builtin weapons system but that's too complex for this

jade schooner
#

Wydm by builtin weapons

amber inlet
#

i never use built in so

jade schooner
#

If I use in button comp can it be fixed?

amber inlet
jade schooner
#

Oh

#

THANK YOU

#

I Made a solution in my head