Started by
Evansomething
on
Topic category: Help with modding (Java Edition)
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
Topic category: Help with modding (Java Edition)
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
and i should specify that's its when its equipped
and in a curio slot as well
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)?
well i figured something out but thing is how would i increase it each time the key is pressed?
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
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.
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.
could you show me an example of this?
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.