Help with Global Variables and Teleporation?

Started by MixxC on Fri, 07/09/2021 - 09:10

Topic category: Help with MCreator software

Last seen on 02:24, 8. Sep 2021
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with Global Variables and Teleporation?
Fri, 07/09/2021 - 09:10

I've created an item that allows a player to set a position, and then teleport back to that position. I do this by having three "Global Map" variables for X, Y, and Z, setting them to the player's current position, and then setting their position to those variables when the second item is used. My question is: If one player sets a position, and then the other player uses the second Item, will they be sent to the position the first player set, or the default value of those variables? Basically, are these positional values unique to each player? If not, is there a way to make them? Because if they can't be, this item is pretty much useless. "Global Map" variables seem to be the only ones that work, and I don't want to publish a mod with this big of a potential bug. Help?

Last seen on 02:24, 8. Sep 2021
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Problem solved! I just had…
Sat, 07/10/2021 - 04:07

Problem solved! I just had to delete all mentions of the variable in the procedures, and recreate them with the one difference being that they where CREATED as Player_Persistent from the outset.