Random 0 1 is weird

Started by RandomDudeGamer on

Topic category: Help with MCreator software

Active 5 months ago
Joined Jul 2021
Points:
711

User statistics:

  • Modifications: 3
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 127
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
Active 5 months ago
Joined Jul 2021
Points:
711

User statistics:

  • Modifications: 3
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 127
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!

Active 5 months ago
Joined May 2021
Points:
751

User statistics:

  • Modifications: 2
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 171
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

 

 

Active 5 months ago
Joined Jul 2021
Points:
711

User statistics:

  • Modifications: 3
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 127
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.