#having trouble with scoreboard cooldown timer

1 messages · Page 1 of 1 (latest)

stable hazel
#

ok so I have an ability function that triggers every time you hit someone holding a sword with a custom enchant and I want to add a 20 second cooldown so that every 20 seconds it triggers when u hit sm1 but I just cant get it right

stable hazel
#

so if someone could go over a step by step guide on how to do this

rose mantle
#
  1. have a function tagged in #minecraft:load that creates a scoreboard objective for your cooldown to use.
  2. have a function tagged in #minecraft:tick that for all players with a score greater than 0. e.g as @a[scores={<objective>=1..}] removes 1 from said score.
  3. set the cooldown value whenever your specific function is run, the value should be the number of ticks the cooldown should be.
  4. feel the dopamine of creating something that works.
stable hazel
#

lol

#

ok thank you

#

actually is there maybe a youtube tutorial you recommend?

#

so I can like see an example maybe

rose mantle
#

not the most up to date guide, but it should do the trick

#

the actual cooldown creation starts around the 2:00 mark

versed stratusBOT
versed stratusBOT
versed stratusBOT