Can i specify which slot the player needs to have an item in for the event to trigger?

Started by Exarpo on

Topic category: Help with MCreator software

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can i specify which slot the player needs to have an item in for the event to trigger?

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?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Each piece of armor has an…
Fri, 10/04/2019 - 13:38

Each piece of armor has an update tick event

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes, but i cant just add…
Fri, 10/04/2019 - 13:47

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?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Couldn't you use a global…
Fri, 10/04/2019 - 13:55

Couldn't you use a global variable for that?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use a key binding as a…
Fri, 10/04/2019 - 13:57

Use a key binding as a toggle for a global variable to turn off and on your jetpack.

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
On your key binding: If…
Fri, 10/04/2019 - 14:03

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

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I suck at d´making…
Fri, 10/04/2019 - 14:24

I suck at d´making proceduresm i dont understand hwo to do this... I cant find how to make the "if jetpackgvalue = 1 then".

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think I have figured it…
Fri, 10/04/2019 - 14:41

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?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm doing this form my phone…
Fri, 10/04/2019 - 15:10

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.

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just to clarify I was using…
Fri, 10/04/2019 - 15:15

Just to clarify I was using the helmet just to show you.

You probably want to put it on your chest armor.

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's working! thx so much,…
Fri, 10/04/2019 - 15:41

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?

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry I'm an idiot, slow…
Fri, 10/04/2019 - 15:49

Sorry I'm an idiot, slow falling was added in 1.13 xd. Do u have anotehr solution for this problem?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can either make special…
Fri, 10/04/2019 - 15:50

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.

 

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The problem is... taht slow…
Fri, 10/04/2019 - 16:22

The problem is... taht slow falling effect was added in 1.13, this mod is for 1.12.2