Revive player after death procedure. Not working.

Started by Veyas on

Topic category: Help with modding (Java Edition)

Last seen on 17:24, 6. Feb 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Revive player after death procedure. Not working.

I'm working on a entity reviving effect with a small, 3 second cooldown. But everytime I try to kill myself with this effect, it's not working. I'm slowly getting annoyed cause I can't do anything with it. I also have another effect that cancel cow death, to drop something, then despawn it to prevent other drops, it's triggered the same way, but it's working. I can't figure it out.

https://imgur.com/a/xgSCxyR

Last seen on 15:34, 12. Aug 2023
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I dont think you can cancel…
Sat, 07/29/2023 - 17:16

I dont think you can cancel death?

Last seen on 23:52, 18. Apr 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The issue isn't that player…
Tue, 08/08/2023 - 22:26

The issue isn't that player death isn't cancellable, but the player's health after the cancel is still 0, so the game kills the player again. Here's how to fix it: Set your player's health to anything above 0, before the 'Cancel event that triggered global trigger' block. 

Because their health is above 0 when their death is cancelled, they don't immediately die again. Plus, you can set the player back to a specific amount of health, or just back to full.