Main Script – Overview


Nodes used to control this script…

  • Riot_full – value store that starts / stops the game.
  • The round value stores the current round 1, 2, 3 etc…

Figure 1

This script runs the selected rounds in order from start to finish. As each round is completely independent from the next you save yourself a lot of trouble by making every round an individual unit so all you do is just plug them in here.
In total I created about 20 – 30 separate rounds for Danvers Island; testing wave numbers, wave strengths, different character combos, the timing of spawns, weapon load outs etc… But only 6 were required.

Using this plug-in system I could quickly swap rounds for others or re-order the list so they come out in a different sequence. As you can see in figure 1, there is a connection missing between the second and third state block. This would break the script and not actually do anything. This is not a mistake. This is showing a valid testing tool. Yes in the full game it is connected up but for testing purposes I can run any riot control round I want by selecting it from the debug menu, except with having all the Riot control extras running on top.

Breakdown

Part 1

Figure 2

This starts the game mode off, first up is a blank state block and then moves into a condition to check if riot_full is at a value of 1, if the condition is met move on to the next state block which sets up the quick takedown mode to on.

Part 2

Figure 3

This is the first of 6 identical systems each controlling one round. I will only go through one of these to save repeating myself.

  • What happens here in the first state block is it increases the value store of the round I want by 1, to start it and also plays the first audio track.
  • Then in the condition it tests to see if the value of that rounds value store is at 2. (When the round is finished it increases this value store itself).
  • Now we know the previous round is completely finished and that there’s no way two rounds can bleed into each other. And we are now safe to start the next round.
  • The rounds are…
    Easy_riot_04 – Undercover GAC
    Med_riot_04 – Sniper round
    Med_riot_05 – Heavy Round
    Med_riot_06 – Boss – Riggs
    Hard_riot_02 – Swarm round
    Hard_riot_01 – Boss – Redwater & Tanks
Part 3

Figure 4

When the player has survived and completed all 6 rounds, it’s time to close down Riot Control mode.

  • In this last state block we total up the players score / time and upload this information, writing to the weekly, monthly and overall leader boards.
  • If the player fails to complete all 6 rounds, there is a similar script running on the player’s character to deal with an early death and still write your score to the leader board.

So to round this up…

The world starts and sets up the game for Riot Control mode. Each round starts and finishes before the next one can begin. When all rounds are complete, total up the scores, close the session, write to the leader boards & display statistics screen to review you session.

NEXT PAGE