Need Help Making Armor That Gives Potion Effects When Worn

Started by Ampersand on Tue, 07/02/2019 - 01:44

Topic category: Help with MCreator modding

Last seen on 22:50, 17. Nov 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Need Help Making Armor That Gives Potion Effects When Worn
Tue, 07/02/2019 - 01:44

Hey! So I'm trying to make a mod with different types of armor, each set giving you different potion effects while worn. I want to have the effects get stronger as you wear more pieces of armor. I tried to do this by messing with variables and if statements but couldn't get it to work. Can someone help me with this or walk me through it?

I also need help getting the effects off the player when they're not wearing any armor. Once they put a piece on, the effect is there permanently.

Thanks for your time!

0Upvote this forum topic
Last seen on 22:47, 10. Dec 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Add this procedure to on…
Tue, 07/02/2019 - 08:36

Add this procedure to on tick update of every armor piece:

If item in player's armor slot 0 = helmet

Set (local variable) to (local variable) +1

If item in player's armor slot 1 = chestplate

Set (local variable) to (local variable) +1

If...

Set...

If...

Set...

Add potion effect to player level (local variable) for 60 ticks

 

 

I don't remember well the names of the procedure blocks right now. If you want, I will later send you an image

0Upvote this forum topic
Use armor tick event and add…
Tue, 07/02/2019 - 08:39

Use armor tick event and add the effect to the player each armor tick for one tick.

0Upvote this forum topic
Last seen on 22:47, 10. Dec 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Helmet's ID is 3 while boots…
Tue, 07/02/2019 - 08:59

Helmet's ID is 3 while boots' ID is 0*

0Upvote this forum topic
Last seen on 22:50, 17. Nov 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Yeah, if you could send a…
Tue, 07/02/2019 - 14:33

Yeah, if you could send a screenshot, that would be great, but when you say "if item in armor slot 0 = helmet" How do I put in the helmet? Should I just add an item box thing and add the custom helmet?

0Upvote this forum topic
Last seen on 22:50, 17. Nov 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Also, are both of the local…
Tue, 07/02/2019 - 14:44

Also, are both of the local variables the same?

0Upvote this forum topic
Last seen on 22:50, 17. Nov 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Nevermind, works great! Only…
Tue, 07/02/2019 - 15:04

Nevermind, works great! Only thing is, If I want the effect to be speed 1 for example, do I have to set the effect level to 0?

Anyways thanks for helping me out!

0Upvote this forum topic
Last seen on 22:47, 10. Dec 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Yes, effect levels start…
Wed, 07/03/2019 - 07:54

Yes, effect levels start with 0 but are displayed as starting with 1 in the game.

Glad I could help :)

0Upvote this forum topic