#How to add delay/cooldown to consumable right-click item

1 messages · Page 1 of 1 (latest)

analog briar
#

Hello,

I do wonder how to add delay or cooldown to consumable right-click item.

For instance, when I right click fireball, I gotta wait for 3-5 seconds then able to cast again.
-# Although, I'm still learning how to do raycast, I'll do that later, I just wanted to know how to do cooldown/delay

However, I am not sure because I'm using advancement to trigger rewards to run functions.

Basically, I wanted to add scoreboard makes (UNIQUE ID) cooldown.
-# I need to learn how to make unique ID, got any idea how to do that? Please send link of example or such.

But that is the issue, because when triggering reward, it is only one-time thing. I did thought of putting it in tick but I am not actually not sure how to do that properly.

Could you be kindly to give example so I get an idea and be able to do it. Thanks.

past hingeBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1735795501:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

analog briar
#

Actually, I figured it out. BEST way is using "use_cooldown" component.