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

Started by Max094_Reikeb on Sat, 03/21/2020 - 21:28

Topic category: Help with MCreator software

Last seen on 18:17, 25. Nov 2020
Joined Jun 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Prevent player's NBT tag from reseting themselves when player dies
Sat, 03/21/2020 - 21:28

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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 18:17, 25. Nov 2020
Joined Jun 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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