Global Map Variables Not Saving

Started by SpiritUnion on Sun, 01/12/2020 - 22:57

Topic category: Help with modding (Java Edition)

Last seen on 22:51, 17. Feb 2020
Joined Dec 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Global Map Variables Not Saving
Sun, 01/12/2020 - 22:58 (edited)

I have a block that stores it's position in 3 global map variables (x, y, z) and a item that will teleport the player on top of that block. These variables are set as soon as the player places the block. Everything works perfectly until the player leaves the world. For some reason, it resets all the variables back to the initial values. According the the wiki page on variables, global map variables should save with the world so I don't know why they reset. Is this a bug or can someone explain this to me?

Edited by SpiritUnion on Sun, 01/12/2020 - 22:58
Last seen on 12:44, 15. Aug 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Which MCreator version and…
Mon, 01/13/2020 - 15:06

Which MCreator version and which trigger do you use to set variables?

Last seen on 22:51, 17. Feb 2020
Joined Dec 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
MCreator Version 2019.5 I'm…
Tue, 01/14/2020 - 00:43

MCreator Version 2019.5

I'm using the trigger "When block is placed by" in the block's triggers. The procedure the trigger calls is an if statement testing if the block has not been placed (the initial value of the variables, "123456789," have not been replaced) it will set the global map variables x, y, and z, to the block's x, y, and z coordinates. Just to be clear, the actual variable names are not "x," "y," and "z," just in case that might cause a different issue.

Last seen on 12:44, 15. Aug 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Please open a support ticket…
Tue, 01/14/2020 - 10:04

Please open a support ticket, attach your workspace and tell me how to reproduce / test this bug in the game. Thanks!