Cooldown on abillity after 5 uses

Started by R_XclusiveNL on

Topic category: Help with modding (Java Edition)

Last seen on 17:23, 7. Mar 2023
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Cooldown on abillity after 5 uses

So i made a sword that  teleports you 5 blocks (or more)

With after the teleports this grands u Speed II.

Heres a GIF: https://i.gyazo.com/96b4a0ca9a8890e2de8bab860042385b.mp4

I feel like being able to spam this is somewhat unfair

How do i add a cooldown after, lets say 5/6 uses?

I know how to add the cooldown itself, but that applys the cooldown after each use of 1 teleport.

Anyone able to help me?

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just use NBT Number Tags and…
Fri, 10/01/2021 - 18:21

just use NBT Number Tags and make it so when it right clicks it 

increases by one and if it is 5, it makes a cool down + it makes NBT Number Tag again to 0

Last seen on 17:23, 7. Mar 2023
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That was my idea aswell…
Fri, 10/01/2021 - 18:26

That was my idea aswell after a few mins of searching for a block, but it gives this error on the right down side after adding it somewhere https://prnt.sc/1udz9p8 Is that a problem?

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that is not an error, also…
Fri, 10/01/2021 - 18:28

that is not an error, also use 1 + get NBT Number Tag of Provided Itemstack etc etc

Last seen on 17:23, 7. Mar 2023
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright, but now the…
Fri, 10/01/2021 - 18:40

Alright, but now the abillity doesnt work at all.

https://prnt.sc/1ue0x9z

Did i do something wrong? i used the cooldown feature on other things and they work fine

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that is one of the messiest…
Fri, 10/01/2021 - 18:48

that is one of the messiest procedures I have seen, I am sorry if I offended but it is true

Your new procedure

if provided itemstack number tag NOT_EQUAL 5

  do your ability

      set provided itemstack number tag to get provided itemstack number tag + 1

else if provided itemstack number tag = 5

set cooldown for provided itemstack

set provided itemstack number tag to 0

send message to event target entity Cooldown Activated show in action bar

Last seen on 17:23, 7. Mar 2023
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Lmao its ok, this is my 2nd…
Fri, 10/01/2021 - 18:54

Lmao its ok, this is my 2nd day coding or ''making a mod'' with mcreator. So im not sure how to minimize a procedure.

And thank you, i will try this and let you know if it worked.

Last seen on 17:23, 7. Mar 2023
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I cant seem to link '…
Fri, 10/01/2021 - 19:28

I cant seem to link ''Provided Itemstack'' to anything, unless it like this https://prnt.sc/1ue7399

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
.....look just make my…
Fri, 10/01/2021 - 19:40

.....look just make my procedure and put it on When Player Right Clicks with item trigger 

Last seen on 17:23, 7. Mar 2023
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Got it to work, ty
Fri, 10/01/2021 - 23:37

Got it to work, ty

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
:)
Sat, 10/02/2021 - 01:54

:)