Repeat (a number) OR (a number) times; Is it possible ?

Started by GendarmyY on Sat, 07/04/2020 - 16:00

Topic category: Help with MCreator software

Last seen on 12:53, 25. Jul 2020
Joined May 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Repeat (a number) OR (a number) times; Is it possible ?
Sat, 07/04/2020 - 16:00

Hello everyone,

I basically want to know if we can use the procedure "Repeat [...] times" and say like: "repeat 1 OR 2 times" so that it randomly repeat the command 1 time or 2 times, or just if it's possible to repeat a random amount of times. I've tried to put the [__ OR __] procedure but it doesn't fit in the "Repeat [...] times "

Sorry if it's hard to understand, english is not my main language and I tried my best. If anyone can help with this, I'll greatly appreciated !

Last seen on 07:19, 8. Aug 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
  You could also get any of…
Sat, 07/04/2020 - 21:40

If Random Number [0,1] < 70If Get Number

 

You could also get any of those numbers set them to any number then have it repeat it X amount of times.

Btw if you have it set to repeat it 1 time it will run the code then it will run it how ever many more times you have it set to. 

Last seen on 07:19, 8. Aug 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
My Pics didn't import well…
Sat, 07/04/2020 - 21:47

My Pics didn't import well oof.

you can do.

 

if  (Random Number [0,1] < 70)

repeat 0 times.

else repeat 1 times.

This will do an if statement if random number is less than 70 then repeat it 0 times. if not less than 70 repeat it 1 times.

Last seen on 12:53, 25. Jul 2020
Joined May 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It worked, Thank you ! :)
Mon, 07/13/2020 - 16:56

It worked, Thank you ! :)