Please don’t be intimidated by the length! Its just really simple systems explained through a problem solver’s view!
This series of guides aims to make you feel like you could have and can make the some of the most complex systems. We’ll start small in this guide. First, lets make a battle royale game. We first need to define our objective.
A battle royale game eliminates people until there’s only one person left. So to make this work, we first need to eliminate people when they get knocked out. We have 2 ways to detect knockouts: knockout managers, and lifecycles. Knockout managers use less memory, so lets use that. So we place down the knockout manager. Right now, it isn’t doing anything, so we need make it eliminate people. Wolf, I’m making this series mainly for you so you can help other people with devices like other regulars
The best way to eliminate players is to turn them into a spectator. So let’s place a team switcher down. Set the team to spectator and the receiving channel to whatever channel the person dies on. DO NOT USE WIRES!!! If you use wires because you don’t get channels, then you won’t be able to understand when we use concatenation, which we’ll talk about in a later guide. So now we have this:
If you start the game, it’ll be the most boring game in existence, because you don’t get weapons. So to have weapons, use the starting inventory device. Choose whatever weapon you want. However, now the game can’t end! Here’s a bit more complex, but still simple problem. How do we count the number of players in a game? It’s kind of like taking attendance in a class. You ask them if they’re there and they’ll say yes if they’re there, and if don’t say anything, we just assume that there’s nobody there. So we need a relay that broadcasts to everyone.
Think of this as someone asking everyone all at once “Are you here?”. If they say yes (the person is there) then we increment a counter. Then, later, after we ask them, we have to check if the counter is at one or less. So now make a trigger with a delay of .2s (to make us sure that all the attendance checks have happened). This trigger activates a checker that checks if the counter less than or equal to 1. But wait! If you search for a counter setting, you won’t find one! So you have to make the counter edit a property so the checker can do its job. Note that the counter does not have a less than or equal to, so you have to set the checking number to 2 and make it less than. If you’re reading this, say that this guide is better than my voting guide so I know you read it. So this is what we have as of now:
But wait! We need to start the check! Both the relay and the trigger start at the same time, so they have to be triggered by the same channel. When should we check the amount of players? Its up to you! If you think your game will be fun enough that people don’t leave, then make the relay and trigger be triggered by the same channel the knockout manager broadcasts on! If not, then you need a trigger that triggers itself (add a delay greater than the delay of the other trigger). This trigger should broadcast to both the relay and the trigger to check.
And now you have the bare bones of a battle royale! And not just that; you also have more experience with problem solving.