Armor Health boost help!

Started by iYurY on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Armor Health boost help!

Hi, sorry for bad english, im from south america

I want to recreate the Netherite armor, that includes the Health Boost, but i have problem, i dont know how to make that the effect apply one time.

im not expert at creating with Mcreator, but i know that using the global trigger "on player tick update" will make that the effect apply every tick, turning the health back to 10, making imposible to regenerate the "extra hearts" that the Health Boost give you

Pls help :/

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can make a procedure…
Sat, 06/13/2020 - 02:41

You can make a procedure that instead of giving the effect every ticks its give you the effect every 2 secondes for exemple. The procedure should be like that i think:

if entity have status effect health_boost then

...

else

give entity status effects health_boost for 2 sec(write the equivalence in minecraft ticks)

--------------------------------------------------------------------------------------------

Sorry if im not clear, i hope you understand my answer

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a timer using nbt tag…
Sun, 06/14/2020 - 02:38

Create a timer using nbt tag on the same player tick update procedure, make as so IF time > determined value DO add potion effect for determined value + and set time to 0.

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry i still dont…
Sun, 06/14/2020 - 20:15

Sorry i still dont understand, i guess a Photo can help me :D

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Global variable(Not for…
Mon, 06/29/2020 - 04:54

Global variable(Not for multiplayer):TicksLeft

default=0 type=number

when armor tick(head,chestplate,boots or leggings):

if TicksLeft = 0:

    then  TicksLeft=SomeValue

give player effect(health boost for time SomeValue+1)

PS:+1 is used to prevent the player lose effect and health=10 and then give it will keep heart in 10 so...

when armor is off:

check player armor slot

if none of them was the type of armor:

    then  TicksLeft=0

    remove the effect(using procedure execute_command_as_entity(/effect clear @s id_got_by_autocomplete_in_minecraft) or just clear_effect)