How do i add cooldown to motion vector?

Started by Just-Guardian-… on

Topic category: Help with modding (Java Edition)

Last seen on 19:49, 16. Oct 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i add cooldown to motion vector?

So i Tried to Add A Double Dash Procedure where Keybind R is clicked it lets you dash 2 times (once in air , once on ground) and make cooldown to it but i cant figure out the Cooldown for This procedure (I tried to use wait procedure but it doesn't trigger The motion Vector)

What i could use to do the cooldown for it?

Here is The Screenshot of procedure:

https://imgur.com/a/P23VT7p

 

Last seen on 17:20, 17. Oct 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
-if  not get event target…
Tue, 07/16/2024 - 21:42

-if  not get event target entity custom logic NBT tag "candash" = false 

-(your procedure to dash)

-set event target entity custom logic NBT tag "candash" to false

-wait ... ticks 

-set event target entity custom logic NBT tag "candash" to true

 

Last seen on 19:18, 17. Oct 2024
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think the problem could be…
Tue, 07/16/2024 - 21:45

I think the problem could be that in players the block "Atempt to override motion of Entity" works only in tick updates of the player (there are exceptions but is a bit strange). What i do in this cases is create a potion effect for this action, a potion effect called Dash that in each tick update does "Atempt to override motion of Entity" to the player. And in the dash procedure replace the actual blocks with  "Add potion effect dash for 1 (i recommend more) ticks"