*rand is hitting the same number a lot? Please help!

Okay so something new I’m trying to…um, TRY, is using the *rand command for variables and numbers! Like so it randomly chooses between different options. I have it set up to go through three different variables and set them randomly, but it’s just picking the first choice on each one every time? Please help!

*rand alter_name 0 1

*if alter_name = 0
  *set alter_name "Jessica"
  *goto altergendergen
*elseif alter_name = 1
  *set alter_name "Eric"
  *goto altergendergen

*label altergendergen

*rand alter_gender 0 1

*if alter_gender = 0
  *set alter_gender "Woman"
  *goto alterpowergen
*elseif alter_gender = 1
  *set alter_gender "Man"
  *goto alterpowergen

*label alterpowergen

*rand alter_power 0 1

*if alter_power = 0
  *set alter_power "Cryokinesis"
  *goto history
*elseif alter_power = 1
  *set alter_power "Super strength"
  *goto history

I don’t know how I did this wrong? :frowning:

Perhaps, due to your sheer number of luck, the randomizer hit that 1/8 chance so it always hit all first options?

Try randomizing again.

Can’t believe I’m saying this xD

1 Like

Oh, hi Szaal! :slight_smile: You’re like in all my threads! Super nice and helpful!

I’ll try randomizing again I guess. Maybe try more options, cause I only have two options so it’s 50 50 chance and blah…

Code looks ok; this looks like failure to pay tribute to the RNG gods.

I did a blackjack game in ChoiceScript and I can swear the AI cheats…


Ahhh!!! SZAAL YOU WERE RIGHT! <3 THANKSY!!! I tried again and it PROPERLY randomized! <3 Stupid 50/50 luck!!! :slight_smile: Thanksy!

1 Like

It was! :smiley: Thanks for saying my code looks okay!