Started by
Exarpo
on
Topic category: Help with MCreator software
I'm trying to make a jet pack, so I was trying to make a key binding that when you press space you will get levitation, but I wanted it to only trigger when the player is wearing the jetpack, I found a thing in the procedure so I could make the player get levitation when the player has the jet pack in his inventory, but I didn't find anything that made the player only get levitation while actually wearing the armor, and not just having it in their inventory. please help... how can I specify which slot the player needs to have the jetpack in?
Each piece of armor has an update tick event
yes, but i cant just add levitation to the update tick event because it would be triggered all the time i am weráring the armor, i want the player to get levitation only if he is: 1: wearing the armor and 2: Pressing space button. How do i make so he needs to press the space button too? I need to use a key binding right?
Couldn't you use a global variable for that?
Use a key binding as a toggle for a global variable to turn off and on your jetpack.
On your key binding:
If JetpackGvalue = 1 then
JetpackGvalue = 0
Else
JetpackGvalue = 1
Endif
In your jetpack tick:
If JetpackGvalue = 1 then
Give levitation
Endif
I suck at d´making proceduresm i dont understand hwo to do this... I cant find how to make the "if jetpackgvalue = 1 then".
I think I have figured it out, except that i only know how to make a local variable, you said global variable, how do I make a global variable?
https://ibb.co/MpW6mz3
https://ibb.co/61DTVh4
https://ibb.co/37T41Qr
https://ibb.co/JxcHCTn
https://ibb.co/stdgWWy
I'm doing this form my phone I have no internet on my computer and I was having a tough time with the phone sorry it took so long.
Just to clarify I was using the helmet just to show you.
You probably want to put it on your chest armor.
It's working! thx so much, there is just one issue... when you fly high up, and then slowly go down even if you do the smoothest landing you will die of fall damage? do you think I should just add slowfalling always when you wear the jetpack or so?
Sorry I'm an idiot, slow falling was added in 1.13 xd. Do u have anotehr solution for this problem?
You can either make special boots that absorb the fall damage with that potion effect.
Or just add it to the keybind
when the value is set to 0
Add slowfalling
that way you can make if they fall from a great distance they still take damage but if they fall from a minor distance they take no damage.
The problem is... taht slow falling effect was added in 1.13, this mod is for 1.12.2