J
jewnko
Guest
Hey,
I'm trying to make a small 2D shooting game with the GM2.
I made a spawner for the monsters & tried making it so that the spawner doesn't alow the monsters to spawn outside or in the walls but it isn't working.
I used this code on the spawner
Create spawner:
Step:
Thanks in advance!
I'm trying to make a small 2D shooting game with the GM2.
I made a spawner for the monsters & tried making it so that the spawner doesn't alow the monsters to spawn outside or in the walls but it isn't working.
I used this code on the spawner
Create spawner:
Code:
spawnrate=60;
alarm[0] = spawnrate;
Code:
var xx,yy
xx = random_range(obj_Wall.x,room_width-obj_Wall.x-5);
yy = random_range(obj_Wall.y,room_height-obj_Wall.y+5);
instance_create_layer(xx,yy,"EnemyLayer",obj_EnemySpawn);
alarm[0] = spawnrate;