Started by
Super_MC_Bro25
on
Topic category: Advanced modding
I'm trying to make a keybind that gives a player an item if he/she's wearing a specific armor, but I can't figure out how to do this. I also will need various more keybinds like this. Any help will be very much appreciated.
Use variables
How would I use variables?
Make that if someone is wearing armor a variable is set to 1 and make the keybinding event happens if the variable is set to 1
I'm trying this, but how would I edit it in the source code?
Anyone? I really want to know how to do this.
In the keybind code check if the armor slots are not null , and if they are not null , check if the names equals to your armor names.
What do you mean? I need further context to understand what your saying.
Anybody?
Use two variables, i.e ArmorWear and KeyBind, (The names don't matter) and if the player is wearing the armor, set ArmorWear to 1, and if the player is pressing the key, set KeyBind to 1, and if both are one, then give the player an item. Then do if the player is NOT wearing the armor and set ArmorWear to 0, and do the same for KeyBind.
@#9 yes but how do you sense wearing armor!?
sry im just dying to know how to do this