I
iBack
Guest
Hi, I'm continuing from the tutorial that shaun created in "your first game" and i have added more features to this tutorial, such as an highscore board and pause menu. What i'm trying to do now is loop levels (fixed number of times, 10 or 20) and have different waves.
This is what I want. Once the player clears the stage, the game will use the same level (since i don't want it to look any different) but the enemy number will change, for example, stage 1 will have 3 enemies, once cleared, the game will move onto stage 2, which will then have 5 enemies. I want to be able to control how many i want on each stage, so not random.
I'm not sure how to go about doing this. Create, 20 rooms and manually place the enemies i want on the stages or use same stage and somehow do what i explained above.
this is what i have so far.
what this code does, inside the obj_enemy step event, once the player clears room 1 it will repeat, i'm unsure if this is a genuine loop. can someone please help me, how do i do what i explained above?
This is what I want. Once the player clears the stage, the game will use the same level (since i don't want it to look any different) but the enemy number will change, for example, stage 1 will have 3 enemies, once cleared, the game will move onto stage 2, which will then have 5 enemies. I want to be able to control how many i want on each stage, so not random.
I'm not sure how to go about doing this. Create, 20 rooms and manually place the enemies i want on the stages or use same stage and somehow do what i explained above.
this is what i have so far.
Code:
if (hp<=0)
{
with (obj_score) thescore = thescore + 5;
with (obj_highscoreboard) global.highscoreboard = global.highscoreboard + 5;
if(instance_number(obj_enemy)==1)
{
instance_destroy();
highscore_add(string(""), global.highscoreboard);
room_goto(rm_game1);
}
else
{
instance_destroy();
}
}
Last edited by a moderator: