J
Jebmv
Guest
Hello, I am trying to create random objects across the top of the game. I got that to work except I cant get them to come down without overlapping. How would I stop this from happening. Here is the piece of code I am using. I put this inside and empty object. And yes this is my first try at making a game.
num = irandom_range(1, 100)
if num < 5 {
xp = irandom_range(75, 544)
yp = 1
r = irandom_range(1,5)
if r>=1 and r<=4
makeThis = obj_bomb
else if r = 5
makeThis = obj_coin
abc = instance_create(xp, yp, makeThis);
abc.speed = 7;
abc.direction = 270;
}
Thank You
num = irandom_range(1, 100)
if num < 5 {
xp = irandom_range(75, 544)
yp = 1
r = irandom_range(1,5)
if r>=1 and r<=4
makeThis = obj_bomb
else if r = 5
makeThis = obj_coin
abc = instance_create(xp, yp, makeThis);
abc.speed = 7;
abc.direction = 270;
}
Thank You