Prevent player's NBT tag from reseting themselves when player dies

Started by Max094_Reikeb on

Topic category: Help with MCreator software

Last seen on 14:00, 14. Nov 2023
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Prevent player's NBT tag from reseting themselves when player dies

Hello,
I've been working on a respawning system (with a block) and I use NBT tags to save the player's position when he right clicks on the block.
The only problem is that NBT tags the player has seems to reset when he dies. So I'm searching a way to prevent that.
Thx for any help.

Last seen on 00:51, 3. Nov 2020
Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
with the global trigger when…
Sat, 03/21/2020 - 22:38

with the global trigger when entity attacked to check for if it's a player entity then save the nbt to global session variables an then do the inverse on a player respawns global trigger this won't work though if someone rage quits the game at least from what i know.

Last seen on 14:00, 14. Nov 2023
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What if the player/entity is…
Sat, 03/21/2020 - 23:16

What if the player/entity is not attacked but dies from lava/drawning? And what if 2 or more players die at the same time?

Last seen on 00:51, 3. Nov 2020
Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not a hundred sure…
Sun, 03/22/2020 - 20:49

I'm not a hundred sure percent if lava and drowning and such would be considered attacked if not you might be able to use the entity dies global trigger but im not sure if that would clear the nbt first or not and session variables are per game session so per player i believe they just get cleared when a player quits the game