for people who are familiar with space shooter tutorial, would like advice on this

Hi! first of all, i don’t know if this is the right forum for my thread if it’s not then please tell me where and close the thread!

now my question, for the space shooter tutorial you build simple game where you control a ship and shoot space asteroids and it goes on until you die, what i want to do is let’s say the player survives 2~3 minutes, i want new type of asteroids to show up after 2~3 minutes, is there any tutorial anyone can link me for this type of script? i would really appreciate as im very new to using unity!

thank you

This really belongs more in the Getting Started or Scripting forums, but to give you a rough idea of what you want to do, look into countdown timers. It’s not terribly complicated to reverse engineer that to work going in the other direction.

1 Like

So you want to create levels. Same doubt i encountered while i am practicing . lets wait until you reach level creation chapter

Adding modifications to Unity’s tutorials is a great way to ramp up your learning quickly. Beginners loose an important opportunity when they finish the tutorial and move on. By spending a little time making a change or three, to a finished project helps solidify the concepts you were supposed to pick up in the project, but also expands your knowledge base
beyond what the tutorial was written to do.

Not sure if your asking how to make a timer or a lot more. Once you start making changes, you are in control, so it’s a good idea to start thinking creatively, looking for all possible ways trigger your change. Time is one way, but it could also be done by counting the spawned asteroids, or by achieving a set score.

private float targetTime = 0.0f;
private int thisAstroid = 0;

Update(){
targetTime += Time.deltaTime;
if (targetTime >= 60.0f)
{
    targetTime = 0.0f;
    thisAsteroid ++;
}
}

That’s one way to use a timer, but there are others that use the time class, see the manual. You’ll need an array of prefabs for your different asteroids and I used thisAsteroid as the index into that array. I’ll leave you to work out the details, you have enough to finish on your own.

Not really, in the space shooter game, space asteroids and enemies drop down, i just want to modify it to let’s say first 2 minutes only 10 asteroids drop as well as 1 or 2 enemy, next 2 minutes, 20 asteroids, and 5 enemy and so on, and this gets increased by each 2 minutes (for example) and goes on infinitely as long as the player is surviving, that’s my idea but i’m very new for this complex stuff so hopefully i can make it :slight_smile:

I provided the answer in my post above.

I get the feeling you just downloaded the project and haven’t actually completed the tutorial manually as intended. I suggest you complete several of the tutorials to get a grasp of the basics. Follow along with the videos, pause and recreate what you just saw, then advance the video some, until the project is complete. Making the projects from scratch along side the videos is the best and fastest way for you to learn. They’re free, take advantage of that.

i’m actually on video #13

thank you for the help :slight_smile:

1 Like

Ok, great! Keep at it, it does get easier, the more you do.