THE IRANDOM FUNCTION IS SUPPOSED TO CHOOSE A RANDOM NUMBER. I HAVE TWO VERSIONS OF THE FUNCTION WHICH BOTH STATE THAT THE INSTANCE "oRocks" CAN BE PLACED IN ANYPLACE WITHIN THE GAME'S BOUNDARIES, ITS HEIGHT AND WIDTH (1366 x 768) but every single time i start the game, the supposed "random rock placement" happens and it goes in the same places. This has happened for years to me and I want to know if anyone else has problems with the irandom function or just has gamemaker-caused problems anyways (not the code you wrote's fault).
Since there is a 1366 x 768 resolution (or 16:9) that means that there are 1049088 possible positions for the rock instances.
Calculator Result
1366 x 768 =
1049088
And moreover, since there is 9 different rock sprites, there is only a 1/9441792 that the irandom function makes them move in those positions, with those sprites. Here are the probabilities after different trials:
one trial: meh (could happen)
two trials: 1 in 9441792
three trials: 1 in 8.9147436e+13
and so forth
i don't know why this is happening.
0 comments