Last Safe Zone

Configuration

Basic configuration

Settings Default Value Min Value Max Value
Number of teams 3 1 3
Number of players 3 1 4
Number of rounds 4 1 7
Unlimited Ammo true - -
Unlimited Gloo Walls false - -
Unlimited Throwables false - -

Changing the values above is possible, but can break some UIs and Logics if exceed the max value or goes below the min value.

Adjusting map location

In order to move the map to a new location, the following level objects are required to be moved to another location. By default, these level objects are placed at Katulistiwa.
katulistiwa-location

Simply move these level objects to another location in order to move the entire map.

Level Object Image Count
Safe Zone safe-zone 1
Spawn Points & Vending Machine spawn-point 1 per team

Additionally, to change the location name on the UI right here:
location-name

This can be adjusted through the the Property Settings -> Overall Rules -> LocationName
change-location-name

Configuring the Safe Zone

The safe zone has 2 stages:

  1. The first shrink will happen for a certain duration with the center of the border staying at the same location
  2. The second shrink from the first center to another center, while shrinking from the current radius to 0.

Stage 1 Safe Zone

Most of the settings for the safe zone of this stage can be changed through the Safe Zone Level objects.
safe-zone-stage-one-settings

The following settings can be changed with some limitations:

Properties Default Value Min Value Max Value
Start Radius 35.00 - -
End Radius 15.00 - -
Start Time(s) 0 - Less than map’s duration
Start Shrink Time(s) 5 - Less than map’s duration
Shrink Duration(s) 30 - Less than maps’s duration
Damage Interal(s) 2 - -
Damage 20 - -
End Time(s) 40 - Less than map’s duration

If Start Time or End Time is set to be greater or equal to the map’s duration, the second stage of the Safe Zone will not exist.

Stage 2 Safe Zone

All Stage 2 Safe Zone Properties can be set through the Overall Rules from the Property Settings. The following can be adjusted.

Properties Default Value Min Value Max Value
SZMoveMin Vector3{30, 0, 30} Vector3{0, 0, 0} -
SZMoveMax Vector3{50, 0, 50} Vector3{0, 0, 0} -
SZMoveDuration(s) 100 0 Less than map’s duration
SZDamage 40 1 -

SZMoveMin and SZMoveMax determine where the center of the safe zone second stage. By default, the safe zone will move its center by 30 to 50 on the X and Z axis.

SZMoveDuration control the duration in which the Safe Zone will move and shrink.

Adjusting the player’s Equipments

Player’s starting equipment.

The player’s starting equipment can be changed in the Player Script. This can be found specifically in the Configure function

player-starting-equipment

Throwables amount

The number of throwables can be found in the Property Settings, specifically in the Player Rules.
The following can be adjusted:

  • GlooWallNum: The number of Gloo wall per round.
  • GrenadeNum: The number of Grenade per round.
  • GlooMelterNum: The number of Gloo Melter per round.
  • FlashFreezeNum: The number of Flash Freeze per round.
  • InhalerNum: The number of Inhaler per round.
  • MedKitNum: The number of Med Kit per round.
  • SuperMedKitNum: The number of Super Med Kit per round.

player-rules

Adjusting the player’s shop.

By default, all vending machines from the templates use the same Shop. This shop’s content can be adjusted by going through the following process: Click on More, then Store and economy:
access-shop-step-1-2

Then click on the following icon to access the shop edit UI:
access-shop-step-3

Reaching this UI allow for the current shop to be editted further.
access-shop-result

Configuring the spawn randomization process

By default, the spawn location of each team will change at the start of every round. This can be toggled from the Game Entity component.
toggle-spawn-randomization

The list of possible spawns that is in the randomization pool can be found in the Configure function from the Global Script. Just by adding or removing the Spawn points that are defined in this function, you can change which spawn point can be used.
spawn-point-config-global-script

The list of spawn point by default will include 4, as can be seen from the image below.
spawn-point-location

Script Explanation

Global Script

When round start, some settings are configured through the Configure function. .The TeamAcedCnt (used to store the number of team that has been eliminated this round) and TeamWon (used to store the team that win this round) are reset. Additionally, the safe zone and it’s end location are also updated during this this time throught the ResetBorder and RandBorderEndLoc function.

global-on-round-start

During this period, all spawn points are added to the list for shuffling. This list can be used by the Team Script to randomize each team’s spawn at the start of each round.
global-configure-randomize-spawn

The RandBorderEndLoc would then conduct its functionalities:

global-randborderendloc

  1. Get all necessary properties from the Safe Zone’s first stage, then calculate the Safe Zone’s second stage’s end position
  2. The function would then wait until the first stage has ended to start the second stage.

During the match, whenever a team is eliminated, the game will check to see if all teams have been eliminated. This function would then update the TeamWon for later usage. This function also update the score from the team that won.
global-on-team-ace
global-check-end-round

In Reseting border, the Safe Zone from the previous round is turned off manually to ensure no 2 Safe Zones are created starting from the 2 round.

global-reset-border

Team Script

When the round start, list of spawn point that is stored in the Global Script will be shuffled. Afterward, the Team Script will use this shuffled list to determine which spawn point the player from each team will teleport to.

team-on-round-start

To toggle this feature, check the configuration tutorial.

Player Script

When player join the game, the following functions are executed to set up the player:
player-on-awake

In Configure, settings related to player’starting weapon can be found. SetProperty is where player’s properties (HP, Drop Item on Eliminated, etc. ) are controlled. As the name suggest PreloadEquipment, and PreloadAccessory will add essential equipments for the game mode (Bag, Weapon, etc. ).

When the round start, the player’s equipment will be reset through the ResetWeapon. The ResetWeapon function will reset the player’s throwables (grenades, etc.) and consumables (med kit). The Game Status UI is also created and update based on the number of team, players, the players’ statuses and the team score during this stage.
player-on-round-start

When a player is eliminated, all player will need to update the Game Status UI to show the correct remaining player count for each team.
player-on-player-eliminated
player-updateplayernum

The UpdatePlayerNum function does the following to update the number of player from each team:

  1. Count the number of player that is alive from each team.
  2. Update the corresponding UI.

This function is also update at the start of each phase, ensuring that the number of player remains accurate throughout the game.
player-on-phase-start

The UI’s deletion is handled through a variety of methods. The first is when the player quit or the match has ended. Second is to if the player quit mid way. And third is checking when the game end through phase id.
player-destroy-ui

HUD Script

MatchStatus Script

The match status UI does not depends on the player, but does update itself automatically, specifically the timer and the map’s location. Both of this task would automatically start at the start of a phase and will end at the end of every phase.
matchstatus-on-phase-start-end

When setting location through the SetLocation function, the location name is obtained directly from the Game Entity from the Manage Component menu.
matchstatus-set-location

The timer is updated every second for each player by calculating the second and minute value from the phase entity.
matchstatus-set-location