Check if Player supposed to die

Started by GamesofFreak on Sun, 01/24/2021 - 01:10

Topic category: Help with modding (Java Edition)

Last seen on 06:48, 24. Feb 2021
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Check if Player supposed to die
Sun, 01/24/2021 - 02:43 (edited)

I want to make an Enchantment like an Totem of Undying that triggers if the Players supposed to die.

Can someone help me with this?

Edited by GamesofFreak on Sun, 01/24/2021 - 02:43
Last seen on 04:31, 25. Feb 2021
Joined May 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The "Entity Dies" procedure…
Sun, 01/24/2021 - 06:01

The "Entity Dies" procedure trigger is cancelable, meaning you can just test if the entity is a player and if they have your enchantment. If those things are true, then cancel the trigger.

Last seen on 06:48, 24. Feb 2021
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how I cancel the trigger?
Sun, 01/24/2021 - 13:26

how I cancel the trigger?

Last seen on 06:48, 24. Feb 2021
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Nevermind I found the cancel…
Sun, 01/24/2021 - 13:34

Nevermind I found the cancel Global Trigger block, thanks for the help.

Last seen on 06:48, 24. Feb 2021
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It worked but I die, I want…
Sun, 01/24/2021 - 13:52

It worked but I die, I want to be work like an totem of undying that prevent from death once.

Last seen on 04:31, 25. Feb 2021
Joined May 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
hmm... Perhaps you could…
Sun, 01/24/2021 - 15:19

hmm... Perhaps you could just prevent the damage itself with the "Before entity is hurt" trigger. To properly do this, you have to make a custom number dependency named "amount" (this can be found in the advanced tab, called Number dependency)

Then just test if "amount" is more than the player's current health. If so, then cancel the global trigger.

Last seen on 06:48, 24. Feb 2021
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thanks now my enchantment…
Sun, 01/24/2021 - 18:54

Thanks now my enchantment works perfectly.