M
Machku
Guest
Hello, im using the latest version of GMS 2, and im making a shooter game, and im trying to make a spawner for it. I need to be able to change the time between spawns and waves, and enemy type, also enemys should pawn at an random y level. I have tried doing this;
///CREATE///
///STEP///
But its really hard to add waves or change enemy types. Maybe using a script with some arguments to choose between enemys and waves???
///CREATE///
GML:
Delay = 300;
Spawned = 0;
GML:
Delay -= 1;
if (Delay <= 0) and (Spawned < 10)
{
instance_create_layer(x,irandom_range(10,310),layer_get_id("Enemys"),oEnemy)
Delay = 120;
Spawned += 1;
}
if (Delay <= 0) and (10 < Spawned < 20)
{
instance_create_layer(x,irandom_range(10,310),layer_get_id("Enemys"),oEnemyInter)
Delay = 120;
Spawned += 1;
}