• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Randomize

R

Rouna

Guest
Hey guys, I know you've all seen this question a hundred times by now, but I cannot get irandom_range to return anything but the same value over and over again.

I've tried putting randomize(); in the same block, nothing, deleted it and placed it into room1 creation code, nothing, deleted that and tried playerobj creation code, as you can guess, nothing. I even tried using randomise and random_set_seed(date_current_datetime) and still it will not randomize.

If anyone can give me a hand or tell me the correct place to put randomize into that'd be awesome, this has been buggin me for hours!
 

Slyddar

Member
randomize() just needs to be placed/run before the irandom_range check. Assign the random value to a variable and show it to see if it is indeed random, as other code you have might not be doing what you expect.
 

TheouAegis

Member
Yeah, maybe you actually set the code to output the same value regardless of what was actually randomized. I mean, did you save the random value to a variable? Or did you just put irandom_range(n)and not save it to anything?
 
Top