This guide will guide you on using an different approach of ending a battle royale than other guides do it. Other guides count the number of players at the beginning and then subtract players from that count to determine the number of players left. This approach, however, will count up, so even if a person has joined, the count will not be shaken off.
Guide
Make a lifecycle listen for a player knocked out. It should broadcast on “Player Dead”. Make a global number property named “Num Players Left”. Make a trigger receive on “Player Dead”. In the blocks, it should set “Num Players Left” to 0. After that, place a block that broadcasts on “Start Count Players”. Make a relay that receives on “Start Count Players”. The audience should be everyone, and it should broadcast on “Count Players”.
Make a trigger receive on “Count Players”. In the blocks, make it increment “Num Players Left” by 1, and broadcast on “Check If End”. Make a trigger with a DELAY of 1 second. Make a checker. Wire the trigger to the checker. The check should be property, and the property in question is “Num Players Left”. It should check if the property is less than 2 (accounting for the fact that the last person might die to a stray bullet at the end). If the check passes, it should broadcast on “End Game”.
Adjustment for Teams
Make the relay broadcast to single player on each team instead of all players.
Conclusion
You don’t have to use this just for battle royales. You can also use this for other games. This uses the relatively simple concept of broadcasting to all players to see how many are left.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10