Check if Player supposed to die

Started by SparkleArts on

Topic category: Help with modding (Java Edition)

Last seen on 11:06, 29. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 SparkleArts on Sun, 01/24/2021 - 02:43
Last seen on 00:30, 24. Aug 2023
Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 11:06, 29. Mar 2024
Joined Feb 2018
Points:

User statistics:

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

how I cancel the trigger?

Last seen on 11:06, 29. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 11:06, 29. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 00:30, 24. Aug 2023
Joined May 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 11:06, 29. Mar 2024
Joined Feb 2018
Points:

User statistics:

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

Thanks now my enchantment works perfectly.

Last seen on 16:37, 16. Feb 2024
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Could you publish the…
Wed, 09/22/2021 - 10:14

Could you publish the procedure? because I didn't understand how to do it

 

Last seen on 23:15, 12. Mar 2024
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i test if the entity…
Tue, 01/04/2022 - 13:18

how do i test if the entity is a player

Last seen on 18:26, 26. Nov 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I also would like to see…
Mon, 04/03/2023 - 14:42

I also would like to see this procedure pls

Last seen on 18:26, 26. Nov 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok nevermind. Im just dumb…
Mon, 04/03/2023 - 15:10

Ok nevermind. Im just dumb and I was doing a stupid thing. You can understand what Im doing there. Just do your own conditions to activate this "second life" and here ya go.

The main point is to choose the global trigger "Entity dies" and then cancel the trigger.
 

https://prnt.sc/St0DkPNLuwxm

Last seen on 13:24, 8. May 2023
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
LeZ, does cancel event…
Thu, 04/13/2023 - 15:31

LeZ, does cancel event trigger work for you with your screenshot's procedure?

Last seen on 11:06, 29. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@_andreax2 Cancel Event…
Fri, 04/14/2023 - 13:41

@_andreax2

Cancel Event Trigger only works with Global Triggers that can be canceled. And these works.

Last seen on 13:24, 8. May 2023
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@GamesofFreak i tried much…
Fri, 04/14/2023 - 13:50

@GamesofFreak i tried much times, and it doesnt work for me. I solved using "before entity hurt"

Last seen on 02:13, 15. Apr 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For me I also set the entity…
Sat, 04/15/2023 - 02:07

For me I also set the entity's life to the maximum to prevent death. I'm working on a death token I may have send the player to a Styx style dimension, or I may just have it restore the health and break.