Do one of ten actions

Started by theDisruptor on

Topic category: Help with modding (Java Edition)

Last seen on 10:54, 6. Oct 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do one of ten actions
How to perform one of ten actions randomly?
Last seen on 15:36, 5. Aug 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
create a local number…
Mon, 07/08/2024 - 14:41

create a local number variable and do this:

set localvar to random integer between 1 and 10.

if loalvar = 1, do action 1

else if localvar = 2, do action 2

else if localvar = 3, do action 3

else if localvar = 4, do action 4

and so on....

Hope I helped! -PixelKid

Last seen on 10:54, 6. Oct 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you
Mon, 07/08/2024 - 15:04

Thank you