YesNoOk
avatar

question about "random" (Read 939 times)

Started by Shin DANZEY, July 19, 2018, 05:17:06 pm
Share this topic:
question about "random"
#1  July 19, 2018, 05:17:06 pm
  • ***
  • The true fight begins now..get in the tournament!
  • Danzey legendary tournament is the final fight!
    • France
    • danzey-legendary-tournament.blogspot.fr/
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
Last Edit: July 19, 2018, 07:25:23 pm by Shin DANZEY
Re: question about "random"
#2  July 19, 2018, 06:51:30 pm
  • ****
    • crepa.neocities.org
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.
Re: question about "random"
#3  July 19, 2018, 07:24:50 pm
  • ***
  • The true fight begins now..get in the tournament!
  • Danzey legendary tournament is the final fight!
    • France
    • danzey-legendary-tournament.blogspot.fr/
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