Global Map Variables Not Saving

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

Topic category: Help with modding

Last seen on 21:29, 18. Jan 2020
Joined Dec 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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
1Upvote this forum topic
Which MCreator version and…
Mon, 01/13/2020 - 15:06

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

0Upvote this forum topic
Last seen on 21:29, 18. Jan 2020
Joined Dec 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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.

0Upvote this forum topic
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!

0Upvote this forum topic