• 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!

SOLVED Help with randomly creating instances within a room.

Code:
room_w = room_width
room_h = room_height
repeat (50)
{
    instance_create_layer(random(room_w), random(room_h), "Fish", obj_fish);
}
This code should create 50 randomly located instances of the obj_fish on the "Fish" instance layer of the room.
It runs fine but nothing happens.
It runs on room start in obj_fish.

Also, If I wanted to change this to an arbitrary rectangle in which the fish are created how would I do that?
 
Last edited:
Top