Check if last player or squad alive - Battlefield 2042 Portal Rules Editor #battlefieldportal
IMPORTANT - the irreversiblyDead event used in this video has been removed and can no longer be used. Replace that event with onPlayerUndeployed which will achieve the same. Unfortunately this is the danger of making tutorials for something that is constantly updated - but it does keep it interesting!
Many game modes need to be able to check how many players are left alive and this guide today will help you check to see how many players are currently left in the game and also award the win (if you want to) to the last player OR squad with players left alive.
The obvious use for this is if you want to create a Battle Royale style mode, but the uses expand well beyond that. A Rainbow 6 or small squad based mode where players only have one life would be using something like this. I really enjoyed the Splitgate game modes Takedown and Showdown and I am thinking of adding that to my list of game modes I want to create so this code will be very useful to do that as well.
Special thanks to everyone who has subscribed so far...I couldnt have got this far without you! If you are watching and haven't subscribed yet, if you find the content useful, please do consider clicking subscribe (and like and follow :))...just a click for you but means an enormous amount to me!
Let me know in the comments what you think of this guide and I really hope this one makes sense. Felt a bit scrappy when I was doing the video so not sure how it has come out in the end so feedback would be really welcome!
****Due to some requests I have made a tweak to this to provide an example without AI that will end when one player is left and award the win to them. Here is the example:
https://portal.battlefield.com/experience/rules?playgroundId=89c6b420-6b84-11ee-b1c7-ca90264f8cda
Example URL for dealing with players: https://portal.battlefield.com/experience/rules?playgroundId=cb279110-fa23-11ec-9148-67a194f954de
Example URL for dealing with teams: https://portal.battlefield.com/experience/package/era?playgroundId=7844df50-e5df-11ec-a909-9792bb57720a
00:00 - Introduction
02:46 - Basic Rules Setup
03:16 - Disable default win condition
03:42 - Spot all AI for testing
04:54 - OnPlayerIrreversiblyDead check who is left
06:40 - Display how many players are left
08:12 - Check win condition - last player alive subroutine
11:33 - Basic Rules for Teams
12:35 - Display how many players left on other team
18:15 - Check win condition - last team alive subroutine
23:41 - Final run through code
24:34 - Final thoughts
Other Videos By Battlefield Dad
Other Statistics
Battlefield 2042 Statistics For Battlefield Dad
At this time, Battlefield Dad has 85,458 views for Battlefield 2042 spread across 73 videos. His channel uploaded over 1 day worth of Battlefield 2042 videos, roughly 39.77% of the content that Battlefield Dad has uploaded to YouTube.