Random 0 1 is weird

Started by RandomDudeGamer on

Topic category: Help with MCreator software

Last seen on 12:37, 30. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Random 0 1 is weird
Fri, 08/06/2021 - 11:49 (edited)

Hi, I was making a mod and I needed a mob to have a 90% chance of reviving on it's death. Only, when I do (if Random 0 1>0.1) it seems very bias. I also tried it the other way around. I don't know what's happening, but it seems to be picking very strangely, as never revives. Is it a bug, or am I doing something wrong?

ALL BLOCK CODE:

(If Random 0 1 < 0.9)

Spawn at x y z CUSTOM:MOB

(else)

Send chat to all players "MOB HAS BEEN DEFEATED"

Edited by RandomDudeGamer on Fri, 08/06/2021 - 11:49
Last seen on 12:37, 30. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nobody has to answer this…
Sat, 08/07/2021 - 10:29

Nobody has to answer this anymore. I decided to just give the boss a different ability, and just buffed his stats a bit. But if you do have an answer, I still appreciate one. Thanks!

Last seen on 09:42, 5. Sep 2023
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use var with random   If not…
Sat, 08/07/2021 - 10:50

Use var with random

 

If not = var 0

AND

(If Random 0 1 < 0.9)

Spawn at x y z CUSTOM:MOB

(else)

Send chat to all players "MOB HAS BEEN DEFEATED"

 

I use this method a lot. Its clunky and you have to fiddle with the (If Random 0 1 < 0.9) by sometimes adding 0s like (If Random 0 1 < 0.009)

 

GL

Chew

 

 

Last seen on 12:37, 30. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks alot, now I know how…
Sat, 08/07/2021 - 22:53

Thanks alot, now I know how to do this. I'll try that next time.