Wait until number variable is randomized

Started by myxical on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wait until number variable is randomized

I have a procedure that has a local number variable. The variable would be set to 0-10 (random 0,1 * 10), and depending on the number rolled a thing will happen. So spawn tnt when number is 1, spawn a parrot when it's 2, etc.

But the number isn't getting rolled. Actually, it is, but after the procedure is finished. Everything is happening at one tick, and that one tick has the number 0 set, only the tick after this one will be rolled. What I would do to fix this is to add "wait 1 tick" block to the rest of the procedure, but that gives me an error that you can't do that on variables. So, how do I fix this?

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If the event itself is…
Tue, 06/29/2021 - 06:19

If the event itself is triggered by an Entity, Item, or Block you could use custom number NBT tags as a workaround

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's triggered by breaking a…
Tue, 06/29/2021 - 19:07

It's triggered by breaking a block. Like a lucky block, for example.

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Then you can still call to…
Tue, 06/29/2021 - 20:34

Then you can still call to the block, itll just run on the air left in its place

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah but it's not working
Tue, 06/29/2021 - 20:55

Yeah but it's not working