Healed when attacked

Started by Trehmor on

Topic category: Help with modding (Java Edition)

Last seen on 17:39, 15. Jan 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Healed when attacked

Im making a potion that when someone attacks you during night, there is a chance that it heals you by 1 but i dont know how to do this. help me please 

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just make a procedure Global…
Sun, 08/16/2020 - 09:36

Just make a procedure
Global trigger : Entity attacked
Procedure : If (is day in world = false) AND (has event/target entity potion effect CUSTOM:YOUR_POTION) AND (Random[0,1) < 0,5) Do : Heal event/target entity by 1

You just need to find the correct procedure blocks.

Last seen on 17:39, 15. Jan 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i cant find the heal…
Sun, 08/16/2020 - 14:08

i cant find the heal procedure block

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just do that :
Mon, 08/17/2020 - 11:06

Just do that :

procedure

Last seen on 17:39, 15. Jan 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much, your…
Mon, 08/17/2020 - 20:20

Thank you so much, your plugin is great, but what happens if i update mcreator when the new release is out ? 

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In general, code doesn't…
Mon, 08/17/2020 - 21:47

In general, code doesn't change. For the 2020.4 update, only one block's code changed, and as you see, I made a patch a few days after the release so don't worry ;)

Last seen on 17:39, 15. Jan 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much, you…
Tue, 08/18/2020 - 02:18

Thank you so much, you really helped me :D