News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

question about "random"

Started by Shin DANZEY, July 19, 2018, 05:17:06 PM

Previous topic - Next topic

Shin DANZEY

what are the differencies between random<150 and random < 150*(AIlevel ** 2 / 64.0) ?

thank you for yours answers! :coollove:

my older name was danzey,now i'm SHIN DANZEY
FOLLOW ME ON YOUTUBE AND my Website

VictorCYBR

random < 150 is a fixed value, while random < 150 * (AIlevel ** 2 / 64.0) is a value that depends on the difficult you set for the AI.

Example, if AIlevel = 8:
8 ** 2 = 64
64/64.0 = 1
150 * 1 = 150

If the AIlevel is 8, it will always return the first number, 150 in this case. If the AIlevel is lower, it will be a lower number.

Shin DANZEY

Quote from: DeathScythe on July 19, 2018, 06:51:30 PM
random < 150 is a fixed value, while random < 150 * (AIlevel ** 2 / 64.0) is a value that depends on the difficult you set for the AI.

Example, if AIlevel = 8:
8 ** 2 = 64
64/64.0 = 1
150 * 1 = 150

If the AIlevel is 8, it will always return the first number, 150 in this case. If the AIlevel is lower, it will be a lower number.

GREAT answer!

my older name was danzey,now i'm SHIN DANZEY
FOLLOW ME ON YOUTUBE AND my Website