Check if last player or squad alive - Battlefield 2042 Portal Rules Editor #battlefieldportal

Subscribers:
1,300
Published on ● Video Link: https://www.youtube.com/watch?v=jnypJcYcYYA



Battlefield 2042
Game:
Duration: 26:45
1,048 views
48


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


2022-04-21Fix experience has validation errors in Battlefield 2042 Rules Editor - This week in Portal
2022-04-10This week in Battlefield - my Bounty Hunter game mode was featured! Battlefield 2042 Rules Editor
2022-03-26Rainbow 6 Siege Secure Area in Battlefield 2042?? (Part 2) - Battlefield 2042 Portal Rules Editor
2022-03-20Rainbow 6 Siege Secure Area in Battlefield 2042?? (Part 1) - Battlefield 2042 Portal Rules Editor
2022-03-06Every Battlefield Portal user needs this! - bfPortal.gg - Battlefield 2042 Rules Editor
2022-02-24Unsupported Rule Event - Battlefield 2042 Portal Rules Editor - This week in Battlefield Portal
2022-02-24Make Custom Capture Points in Portal! -Battlefield 2042 Rules Editor
2022-02-14Complex capture area test preview - Battlefield 2042 Portal Rules Editor
2022-02-06Create your own survival game mode - Battlefield 2042 Portal Rules Editor (aka horde or wave mode)
2022-01-15Is this HUGE news for Portal? Rush returns! - This week in Battlefield 2042 Portal Rules Editor
2022-01-09Check if last player or squad alive - Battlefield 2042 Portal Rules Editor #battlefieldportal
2021-12-23Check if inside circular objective - Battlefield 2042 Portal Rules Editor #BattleRoyale
2021-12-19Placing a circular objective - Battlefield 2042 Portal Rules Editor #Battle Royale Circle
2021-12-17Plotting a circular objective and arrays intro - Battlefield 2042 Portal Rules Editor #Battle Royale
2021-12-17Intro to Circle Objectives - Battlefield 2042 Portal Rules Editor #BattleRoyale Some Maths
2021-12-10Battlefield 2042 Portal Rules Editor - Battle Royale Parachute Drop - Mini Guide Part 2
2021-12-05Getting X, Y and Z positions on a map - Portal Rules Editor - Objectives Pt 1 For Battle Royale
2021-12-02Battlefield 2042 Portal Rules Editor - Use the new blocks in Update 3 (EventDeathType & EventWeapon)
2021-12-02Battlefield 2042 Portal Rules Editor - Add Killstreaks!
2021-11-27Battlefield 2042 Portal Rules Editor - Save was not successful, Portal Server Down...can’t save?
2021-11-25Battlefield 2042 Portal Rules Editor - HUGE News in Update #3!!!



Tags:
battlefield builder
battlefield 2042 web builder
logic editor
2042 logic editor
battlefield 2042 logic editor
battlefield portal
battlefield web code
logic editor battlefield
logic editor guide
logic editor portal
logic editor tutorial
portal rules editor
portal rules editor tutorial
battlefield 2042 rules editor
bf2042 rules editor
battlefield portal rules editor guide
portal last player alive
portal last squad alive
bf portal 2042
bf 2042 portal



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.