Due to the recent resurgence of spam, we have temporarily disabled user creation and page editing/creation as we resolve the issue.

Round Start and End

From Snapwiki
Jump to: navigation, search

Rounds are a common gameplay element that provides structure for gameplay. Rounds can be score or time based.


Use a Timer

On the DOOM SnapMap forum thread Zombie Map Round Start and End help!, user AtomicUs5000 wrote a tutorial on creating a round start and end in a zombie-style map.

Since most of your code is dependent on a round system, this is where you should start. Once you get your round controller system in place, then you simply add on to it. Let's get a round system done with the round number in the HUD so it can be tested, no demons or anything else.

We will start with the break in between rounds, so there is a little delay before zombies start spawning.
Map -> On Match Started -> Start Timer -> Timer "BreakTimer" (set to however long you want breaks in between rounds to be)

Then when the break is over, we will increase the round number by one. Make an Integer variable "RoundNumber" with initial default value of 0, and minimum value of 0.
Timer "BreakTimer" -> On Timer Finished -> Add (1) -> Integer "RoundNumber"

Now we can use the change of RoundNumber to trigger the start of a round.
"RoundNumber" -> On Changed -> Start Timer -> Timer "RoundTimer" (set to however long you want your rounds to be)

Now we want the break timer to start again when the round timer expires...
Timer "RoundTimer" -> On Timer Finished -> back to Start Timer -> Timer "BreakTimer"

There is now a loop of breaks and rounds that will basically run forever. To show the round number on the HUD, branch off the On Match Started that is connected to map.
On Match Started -> Set Active HUD Settings
I changed top right to "Variable", the "Label" to "ROUND", and the Variable to Integer "RoundNumber". RoundTimer01.png

You should test your setup at this point by adding the timers to the HUD.

If this works, then we can move on to demon spawning and despawning. Once that's working, we can move on to the demon buffs and then other details such as the music.