Started by
MamaLuigi
on
Topic category: Help with Minecraft modding (Java Edition)
I have a Keybind that changes a variable by 1 whenever it is pressed, but I want the Kebind to also work when held down, not just pressed.
Is this possible, and if so how do i so it?
Any help would be greatly appreciated!
Edited by MamaLuigi on Thu, 02/15/2024 - 16:27
I'll be honest I was pretty sure that it already had a procedure to hold down, but after checking its not there. And now my mod needs a revision, but without a plugin then its not possible with base Mcreator atm.
I firgured how to do it. I made it so when you press the kebind, it sets a variable to true, and when you release the kebind, it sets the variable to false. Then i made a procedure that runs every tick, and it checks if the variable is true, and if it is the procedure then does something.
What is the procedure block to check if a variable is true or false?
And how do I change the value of the variable when the key is pressed/released?