[TUTORIAL] How to make a command that teleports you to last Death Location.

Started by Ali107 on

Topic category: User side tutorials

Last seen on 20:50, 24. Apr 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How to make a command that teleports you to last Death Location.

First you start by creating three custom global variable, it must be "PLAYER_PERSISTENT" of type "number". The three variables are the player coordinates. So you could name them pX, pY, and pZ.

 

Then create a procedure, make sure the global trigger is set to "Entity dies". Add an if statement that checks if the entity that died is the player. inside the if statement, set the global variables to the player coordinates x, y, and z.

 

After that create a command element, name it whatever you like.

 

Finally, create a procedure from your command element linked to "When command executed" trigger. In the procedure, drag out "Set Location of Entity to:" then replace the x, y, and z with the 3 global variables created earlier.

 

 

I haven't tested if it works or not, but it should work if done properly...

:P

Last seen on 16:10, 28. Apr 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It works like a charm! I…
Sat, 05/07/2022 - 02:43

It works like a charm! I tried this tutorial and made a death scroll that teleports you to your last death location and it teleported you there! The only gripe is that it won't teleport you to the exact dimension you died in, but it will teleport you to the exact coordinates where you died in that dimension.