Wait until number variable is randomized

Started by myxical on Mon, 06/28/2021 - 15:32

Topic category: Help with modding (Java Edition)

Last seen on 17:35, 17. Sep 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Wait until number variable is randomized
Mon, 06/28/2021 - 15:32

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?

Last seen on 02:01, 27. Aug 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 17:35, 17. Sep 2021
Joined May 2021
Points:

User statistics:

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

Last seen on 02:01, 27. Aug 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 17:35, 17. Sep 2021
Joined May 2021
Points:

User statistics:

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

Yeah but it's not working