How to make a one-time procedure

Started by AndreychelQx on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a one-time procedure

May I ask you a question about MCreator? How to make a one-time procedure there (so that after its execution it does not work again)

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
First idea that comes to…
Mon, 04/18/2022 - 23:01

First idea that comes to mind is to use a global variable as a flag.  Set the  procedure to run only if the flag hasn't been set.  As part of the procedure set the flag to prevent further occurrences.