Check if player take damage

Started by EL0FBRENO-_- on Sun, 07/18/2021 - 13:19

Topic category: Help with modding (Java Edition)

Last seen on 22:55, 18. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Check if player take damage
Sun, 07/18/2021 - 13:19

I created an item called "Totem of Dying", and I want that when I take damage, I die instantly, but, I don't know how to check if the player took damage.

Last seen on 02:01, 27. Aug 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Global Trigger - Entity hurt…
Sun, 07/18/2021 - 13:36

Global Trigger - Entity hurt

If Entity is subtype EntityPlayer OR EntityPlayerMP

  • If [checking inventory for item]
  •  - Kill Them

 

OR you could do

 

On Item in Inventory Tick

If item is your item

  • tempHP = current health
  • If current health > tempHP
  •  - Kill them
Last seen on 02:01, 27. Aug 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
That bottom one will work…
Sun, 07/18/2021 - 13:37

That bottom one will work with any entity holding the item

 

The top is targeting specifically players (the MP one is for multiplayer support)

Last seen on 22:55, 18. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank You :)!
Sun, 07/18/2021 - 16:59

Thank You :)!

Last seen on 22:55, 18. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
could you take a screenshot…
Sun, 07/18/2021 - 19:49

could you take a screenshot of the procedure for me? Because I'm not understanding how to do it

Last seen on 02:01, 27. Aug 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Didn't make it, just thought…
Mon, 07/19/2021 - 01:09

Didn't make it, just thought of the blocks and the logic and going from there

 

The health might need DTM's Toolkit plugin

 

The "Kill Them" part can be done anyway you can cause the player to lose health