Call of Hats: Zombies

You're viewing a single comment in a conversation. View all the comments
  • 6 Comments

  • Order by
  • Hi, I'm making a game like CoD Zombies but in 2D I can't make the waves, can you give me a tip for that? I hope you can help me, because your game is very good and functional.

    • What I did was have two global variables: Zombs_to_spawn and Zombs_alive.

      At the start of a wave, I set Zombs_to_spawn to the amount of zombies I want to spawn in the current wave and set Zombs_alive to that same number.

      I will also start a timer and loop it to spawn the zombies.

      When a zombie spawns, subtract 1 from Zombs_to_spawn and loop the timer.

      If the Zombs_to_spawn variable is 0, do not loop the timer.

      When a zombie dies, subtract 1 from zombs_alive.

      when Zombs_alive is 0, start the next round(where you just add 1 to your wave counter and start the loop over)

      Hope this helps!