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

Started by Evansomething on

Topic category: Help with Minecraft modding (Java Edition)

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

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

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

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)?

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?

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

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.

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.

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?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know if you still…
Sun, 10/06/2024 - 23:03

I don't know if you still need this but here.

On key pressed procedure:

On tick update procedure:

This is without using commands.

For the command look up the /attribute command. Then use the create text procedure block and make the command.