This is a redo of another question I asked. First I want to clarify that I am indeed using drag and drop. So saying something like "maybe switching to gml will fix your problem" is appreciated, but wont help. Anyway, this is what my block looks like:

[Create Instance]

Object: object11 X: random(room_width) Y: random(room_height) Layer: "Instances_2"

I have used this to randomly generate things in my games before, but I am now realizing it isn't very random. Every time it generates, it is in a random place, but it is that same random place every time I play. Does anybody know how to fix this? (sorry this was so long)

EDIT: this is NOT an exact duplicate. This is FAR different from my original. Please take that down. /

  • 2
    \$\begingroup\$ If you need to clarify something in your original question, please edit it rather than opening a new question. \$\endgroup\$ – Pikalek Jan 8 '18 at 4:35
  • 2
    \$\begingroup\$ Multiple users voted to consider this a duplicate. If you feel that assessment is incorrect, try including some reasoning to persuade someone who thought it was a duplicate to change their mind. Simply saying "it's not" is unlikely to have the desired effect. \$\endgroup\$ – DMGregory Jan 9 '18 at 2:12

I am almost certain that this is a setting for debugging purposes. Debugging randomness is a pain so sometimes engines do a pseudo randomness with some sort of seed so that you can have consistency for debugging purposes.

I am not familiar with Game Maker but this would be my best bet. hope this helps.

(addition): Just from googling it seems that i am indeed correct and you should call randomize() at the start of your game.Click here to see the DOC.

  • \$\begingroup\$ haha sorry did not realize this was a duplicate . \$\endgroup\$ – Jonathan Camarena Jan 8 '18 at 5:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.