Is there a way to establish permanent global variables?

Started by ululu on

Topic category: Help with modding (Java Edition)

Last seen on 21:36, 14. Jun 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to establish permanent global variables?
Wed, 09/25/2019 - 01:55 (edited)

From what I understand, global variables currently start at their default value every time they're loaded, i.e. a "GLOBAL_MAP" variable set to default to False will always be False when the world is loaded. Is there a way to permanently save the state of a variable so that it is loaded from memory, rather than as a default value?

Edited by ululu on Wed, 09/25/2019 - 01:55
Last seen on 19:55, 7. Jan 2021
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think GLOBAL_MAP is the…
Wed, 09/25/2019 - 06:46

I think GLOBAL_MAP is the permanent one.

GLOBAL_MAP and GLOBAL_WORLD…
Wed, 09/25/2019 - 16:07

GLOBAL_MAP and GLOBAL_WORLD are permanent, plus all NBT tag variables in procedures.

Last seen on 22:09, 16. Apr 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My mod resets my global…
Fri, 04/03/2020 - 22:25

My mod resets my global_world everytime you quit the world, why is this?

 

Name: EndDefeated

Variable type: Number

Scope: global_world

initial value: 0

 

Right clicking with an item sets the initial value to 1

 

The variable resets everytime you exit the world, do you have any solutions?

Last seen on 22:09, 16. Apr 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No im still using 1.9.1 will…
Sat, 04/04/2020 - 13:10

No im still using 1.9.1 will updating to 2020.1 affect my mod in any way?

No, but please update to…
Sat, 04/04/2020 - 13:39

No, but please update to 2020.2 which fixes this bug, 2020.1 still has it.

affect my mod in any way?

Yes, it will fix many bugs your mod has right now due to not using the latest version.

Last seen on 22:09, 16. Apr 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
MCreator 2020.2 freezes on…
Sat, 04/04/2020 - 15:18

MCreator 2020.2 freezes on loading generators 1.12.2 at around 60% of the loading bar, I have restarted my pc, uninstalled & resinstalled multiple times but I have the same issue.

Any solutions?

Last seen on 22:09, 16. Apr 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Even closing it with task…
Sat, 04/04/2020 - 15:21

Even closing it with task manager leaves the loading screen there

Last seen on 22:09, 16. Apr 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks seems to be working…
Sat, 04/04/2020 - 16:13

Thanks seems to be working fine :)