Revive player after death procedure. Not working.

Started by Veyas on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Jun 2021
Points:
527

User statistics:

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

Active 1 year ago
Joined Jul 2023
Points:
139

User statistics:

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

I dont think you can cancel death?

Active 3 months ago
Joined Aug 2023
Points:
174

User statistics:

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