Infection Guide Part 2: Advanced Game Mechanics [Difficulty: 6/10đźź§]

So, you are here because you read my other guide and want to expand on your infection game. Just like the last guide, you do not have to put the text. The text is the settings you need to set the device to. If you did not read it, you should read it here:
Infected Mode Guide [Difficulty: 6/10đźź§]

Here is Section one of this part of the guide: Ending the game automatically when there are no survivors left and displaying how many survivors are left.

Materials:

  • 1 Zone
  • At least 3 Teleporters (I will use 3)
  • Checkpoints (1 less than the number of teleporters you chose. If you use 3, you will use 2 checkpoints.)
  • 1 counter
  • 1 Property Device
  • 1 spawn pad (If you put spawn pads in your map already, remove them)
  • 1 Lifecycle
  • 1 wire repeater
  • 1 repeater
  • 1 overlay
  • 1 End Game device
  • You will use the wire node set to 15 seconds that you used earlier.
  • You will also use the tag zone device you used earlier.

Steps:

  1. First Place the zone down. You will not need to change any settings.

  2. Put a counter down near the zone. Make the counter update the property “survivorsleft.” You will need to change the starting value of the counter to 1. Add a target value to the counter. It should be 0. Wire the zone to the counter: Player leaves zone → Increment Counter.

3)Place

  1. Place a teleporter down in the zone. Be sure to extend the zone in case you need to edit it or wire it. Set the target group of the teleporter to spawn. DO NOT PUT A GROUP.

  2. Take another teleporter set the GROUP to spawn. DO NOT PUT ANYTHING FOR TARGET GROUP. Doing that will ruin the function.

  3. Move the teleporter, the one you set the TARGET GROUP as “spawn”, into the zone if you have not already.

  4. Place a spawn pad on top of the teleporter. It should look like this:

  5. So far this doesn’t sound like what is happening, but trust the process. Now we get to the point. Place down a property device and make the property “survivorsleft,” the same one you used for the counter.

  6. Wire the tag device you used in the last part to the counter: Player tags someone → Decrement Counter.

  7. Put a lifecycle down. Make sure it is on “Game Start.” Place down a wire repeater near it. Change the wire repeater to 3 seconds. Wire the Lifecycle to the Wire node: Event occurs → repeat the wire pulse.

  8. Wire the repeater to the counter: When wire repeater recieves a pulse → Decrement Counter. If you remember the 15 second delay node from the last part, wire that to the counter as well: When wire repeater receives a pulse → Decrement Counter. This is crucial since we do not want the counter to reach its target value before everyone is infected. The wire node waits until everyone is a survivor, then decreases the counter by one, making it the exact amount of players in the game. After that, when someone is infected at the start, it also decreases by 1.

Here is what your machinery should look like now:

  1. Place an overlay down. Make sure it is set to “Text”. Change the location to “Top Right”. Go to the blocks tab. Create a block to activate on the channel “survivorsleft.” This is a new channel. Here is what you should put in your block:

  2. Place a repeater down. Set it to run a task every 0.5 seconds. Also change it to stop when recieving on channel. Leave the channel blank for “Stop repeater when receiving on.” However, you are going to put in the “When task occurs, transmit on.” box: “survivorsleft,” the channel you used in the block. Wire the lifecycle you used just a few minutes ago to this repeater: Event Occurs → Start Repeater.

What that does is, every 0.5 seconds, the repeater will transmit on the channel to the overlay. The overlay will receive the channel and activate the block, which changes the text to Survivors Left: (value of the property “survivorsleft”.)

  1. Now, for the final touches. In this step, we will make it so the game ends when no survivors are left. Remember how you set the counter to start at 1 and the target value to be 0? This is where that comes into play. Place an end game device. Wire the counter to the end game device: Target Value reached → End the Game. This should make it so that when the total number of people on Team 1 (Survivor Team) is 0, the game ends.
3 Likes

great guide, but you could just edit your previous guide and add these things, and this should be level 4 difficulty.

i see what you are saying, but i made this guide separately just because some people may not want all the extra features to go with their game. The only reason i put it at 6/10 is because it can be time consuming and I know that there are people who may not want to build for that long. However, I see what you are saying and thank you for the advice! I have never made a guide before on the forums.

np, just an advice, great first guide

Maybe you could make it so the steps are hidden like

this!

Step 1. ______

Other than that, great guide, very informative!

Hate to be that person but its not their first guide.

and

this is the second part of my first guide. I still count it as part of my first guide as well as these people. I hate to sound rude but that’s just how it is.

3 Likes