increasing speed of player or decreasing it when they press the keybind

Started by Evansomething on

Topic category: Help with modding (Java Edition)

Last seen on 19:43, 11. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
increasing speed of player or decreasing it when they press the keybind

im trying to make a gearshift ability and i want to have it to where the person can shift up and down in speed how would i go of doing that

Last seen on 19:43, 11. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and i should specify that's…
Tue, 09/10/2024 - 00:17

and i should specify that's its when its equipped

Last seen on 19:43, 11. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and in a curio slot as well
Tue, 09/10/2024 - 00:37

and in a curio slot as well

Last seen on 12:44, 15. Sep 2024
Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
to increase or decrease the…
Tue, 09/10/2024 - 05:04

to increase or decrease the speed of the player you need to create a key binding to it to bind procedures in procedures you need to use the command /attribute but since I myself do not know it well look up the arguments of the command on the Internet and to make a check for a particular item and also in a particular slot it is difficult to do first say in which slot you want your item to be located (in the slot with armour in the slot of the shield in the leading hand or in a particular slot of the inventory or hotbar)?

Last seen on 19:43, 11. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well i figured something out…
Tue, 09/10/2024 - 23:41

well i figured something out but thing is how would i increase it each time the key is pressed?

Last seen on 19:43, 11. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
because using the attributes…
Wed, 09/11/2024 - 00:07

because using the attributes works but the thing is i want it to add to the speed each time its pressed until its pressed 4 times or so

Last seen on 16:04, 16. Sep 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your trigger would be on…
Wed, 09/11/2024 - 02:39

Your trigger would be on keybind, then check for variable = true, where the variable = true when the item is in the curio slot idk how to check curio slot, then use a number variable (default = 0) and +1 then add speed effect (get number variable), i cant remeber the exact procedures but you would either use the effect one or use a command and string input. Then either set a logic for when number variable = 4 to then make the keybind press mean that number variable -1 each time etc or to use another keybind for removing speed. Idk if theres a way to make the effect be invisible and unnoticed but that would be beneficial.

Last seen on 16:04, 16. Sep 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could also do the same…
Wed, 09/11/2024 - 02:40

You could also do the same thing but for attributes, use a command made from a string of text and then a number variable, being the level of speed.

Last seen on 19:43, 11. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
could you show me an example…
Wed, 09/11/2024 - 13:53

could you show me an example of this?