How to trigger events on armor equip \ unequip?

Started by ivan122 on Tue, 07/07/2020 - 09:30

Topic category: Help with modding (Java Edition)

Last seen on 10:57, 25. Jul 2020
Joined Mar 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to trigger events on armor equip \ unequip?
Tue, 07/07/2020 - 09:30

I need to change a variable when armor is equipped or unequipped

Last seen on 07:19, 8. Aug 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I need more information. Are…
Wed, 07/08/2020 - 04:58

I need more information. Are you talking about any type of armor or specific armor?

Last seen on 10:57, 25. Jul 2020
Joined Mar 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The one I'm trying to create 
Thu, 07/09/2020 - 08:09

The one I'm trying to create 

Last seen on 10:57, 25. Jul 2020
Joined Mar 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Like, when part of a set is…
Thu, 07/09/2020 - 08:09

Like, when part of a set is equipped, x variable gets +200; unequipped means -200

Last seen on 07:19, 8. Aug 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry i took so long to…
Fri, 07/10/2020 - 18:52

Sorry i took so long to respond i had allot going on but this took me like 5 secs to make very simple what it will do is compare 

all armor slots in vanilla to item you have set to. I would put it on (Global trigger) On player tick update.

Image

 

Last seen on 20:54, 7. Aug 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
your procedure will do the …
Sat, 07/11/2020 - 05:03

your procedure will do the "do" section on every player tick, probably not what op wants. i think he wants it to do something once when put on or taken off.

Last seen on 07:19, 8. Aug 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This code/procedure will…
Sat, 07/11/2020 - 09:12

This code/procedure will work for you it enables 1 time when it's put on and disables 1 time after taken off.

Remember to put this in a procedure with (Global Trigger) On Player Tick Update.

The send message to entity is just so you get the idea, it's NOT needed for this.

Image 

Last seen on 10:57, 25. Jul 2020
Joined Mar 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you!
Tue, 07/14/2020 - 13:42

Thank you!