How do I make a procedure occur when the player takes damage?

Started by Bobh Hob on

Topic category: Help with MCreator software

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a procedure occur when the player takes damage?

I've been trying many things and all of them failed, I want to add a mechanic that makes it so there is a chance that the player gains a status effect whenever he takes damage, however I cannot find any global procedure of anything else that detects whenever the player takes damage. I have tried to make a procedure where when any entity takes damage they gain a status effect, but that crashed my game multiple times so It cannot be that. Any help, please?

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Global trigger : before…
Sun, 10/08/2023 - 12:36

Global trigger : before entity hurt

Procedure: if entity = player

Do apply potion effect

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm sorry, which blocks do…
Sun, 10/08/2023 - 19:46

I'm sorry, which blocks do the "if entity = player"?
I might be blind, but I'm not finding them

Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind, got it 
Sun, 10/08/2023 - 21:47

Nevermind, got it 

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think "Before Entity is…
Fri, 12/13/2024 - 08:00

I think "Before Entity is hurt" is now "Entity is hurt" because i cant find before entity is hurt but the other one.

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also how do i do that it…
Fri, 12/13/2024 - 08:04

Also how do i do that it only counts Mob attacks and not hunger, if i get damage from starving now i also get the effect...

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use "Is [Provided damage…
Fri, 12/13/2024 - 12:49

Use "Is [Provided damage source] of type [Starve]" It means whether the damage source is hunger.