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

Legacy GM Code to spawn

J

JDSTIGER

Guest
This is the current code which spawns 2 different balls

Code:
instance_create(random_range(0,480),-50,choose(obj_miniballwhite,obj_miiballblack))
How do I make it so it spawns them more often
 

M. Idrees

Member
If you want to continuously create them with a delay then make a alarm and put this code to that alarm and then reset the alarm.
 
Last edited:

Micah_DS

Member
If you want to spawn them all in one step, you can do this:
Code:
repeat (100) {
    instance_create(random_range(0,480),-50,choose(obj_miniballwhite,obj_miiballblack));
}
I used "100" as an example value, but obviously you'd just set that number to the number of desired instances.

If you want it to wait in between spawns, you can do what @ZeeStudio suggested.
 
J

JDSTIGER

Guest
If you want to spawn them all in one step, you can do this:
Code:
repeat (100) {
    instance_create(random_range(0,480),-50,choose(obj_miniballwhite,obj_miiballblack));
}
I used "100" as an example value, but obviously you'd just set that number to the number of desired instances.

If you want it to wait in between spawns, you can do what @ZeeStudio suggested.
Thanks I just lowered the amount of steps and it seems to be spawning more now!
 
Top