Check if Player supposed to die

Started by SparkleArts on

Topic category: Help with Minecraft modding (Java Edition)

Active 5 hours ago
Joined Feb 2018
Points:
1988

User statistics:

  • Modifications: 1
  • Forum topics: 163
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 786
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
Active 4 months ago
Joined May 2014
Points:
1034

User statistics:

  • Modifications: 3
  • Forum topics: 24
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 330
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.

Active 5 hours ago
Joined Feb 2018
Points:
1988

User statistics:

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

how I cancel the trigger?

Active 5 hours ago
Joined Feb 2018
Points:
1988

User statistics:

  • Modifications: 1
  • Forum topics: 163
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 786
Nevermind I found the cancel…
Sun, 01/24/2021 - 13:34

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

Active 5 hours ago
Joined Feb 2018
Points:
1988

User statistics:

  • Modifications: 1
  • Forum topics: 163
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 786
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.

Active 4 months ago
Joined May 2014
Points:
1034

User statistics:

  • Modifications: 3
  • Forum topics: 24
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 330
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.

Active 5 hours ago
Joined Feb 2018
Points:
1988

User statistics:

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

Thanks now my enchantment works perfectly.

Active 1 year ago
Joined Dec 2017
Points:
699

User statistics:

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

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

 

Active 9 months ago
Joined Jun 2019
Points:
689

User statistics:

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

how do i test if the entity is a player

Active 3 hours ago
Joined Feb 2022
Points:
414

User statistics:

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

I also would like to see this procedure pls

Active 3 hours ago
Joined Feb 2022
Points:
414

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
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

Active 1 year ago
Joined Apr 2023
Points:
165

User statistics:

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

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

Active 1 day ago
Joined Feb 2018
Points:
1988

User statistics:

  • Modifications: 1
  • Forum topics: 163
  • Wiki pages: 0
  • MCreator plugins: 3
  • Comments: 786
@_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.

Active 1 year ago
Joined Apr 2023
Points:
165

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
@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"

Active 1 year ago
Joined Mar 2023
Points:
187

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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.