Check for player death in mcreator 2022.3

Started by CasualSuolsPlayer on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Check for player death in mcreator 2022.3

So the thing is, i want to grant the player an achievement for their first death, and i cannot find a procedure block that checks for that. Dos anyone know how to do this?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There should be a 'when…
Sun, 10/22/2023 - 19:27

There should be a 'when entity dies' global trigger. Players are considered a type of entity, so you could check if the event/target entity is a player, and, if they are, give them the achievement. Or honestly just create a procedure with this trigger, and then just use the 'give advancement' function. Since only players can recieve advancements, and they can only recieve an advancement once, that should do it.

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes, i know, but i cant find…
Sun, 10/29/2023 - 09:39

yes, i know, but i cant find a way to  check if the target entity is a player... from what i know, there in no tag  for a 'player' entity type. At least i can't find it anywhere

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You don't need a tag. If you…
Sun, 10/29/2023 - 13:51

You don't need a tag. If you go to the 'logic' tab, at the bottom, there's a 'is entity subtype of (entity type)' function, that returns true if the provided entity matches the type. This can be used for simple comparisons, (skeleton, cow, villager, etc.), but also for more complex ones. (You can use living entity, monster entity, or player entity as well.) 

...It took me an embarrassingly long amount of time to find this when I was first starting out. You gotta scroll down a bit.

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Of course, entity data block…
Sun, 10/29/2023 - 18:48

Of course, entity data block put in logic : / 

Thank you very much, i was checking in the wrong place :)