Why doesn't wait work with variables?

Started by Withie The Cryptid on

Topic category: Feature requests and ideas for MCreator

Last seen on 02:39, 18. Apr 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why doesn't wait work with variables?

I really feel like wait ___ ticks should work with variables. It's just too restrictive for it to not work.

Last seen on 23:59, 19. Apr 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It doesn't work with LOCAL…
Thu, 01/26/2023 - 08:24

It doesn't work with LOCAL variables because of how programming works. However, global variables do work in it.

Last seen on 22:15, 13. Mar 2023
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Local variables only work in…
Wed, 03/08/2023 - 21:39

Local variables only work in the current run of code, afterwards they are reset. This is a feature many programming languages have.

For any values you need to keep, use NBT, scoreboards, or global variables.