How to make a Safe Zone timer (Difficulty 2/10 🟨)

This is a guide about how to make a safe zone for battle royale-type games. I checked, and this is not a duplicate guide.

What it does

The safe zone will be an area where players spawn and they cannot fire gadgets. The zone will have a timer, and if you stay in the zone for too long, you will take damage. The timer will be different for each player. This uses about 6% memory.

How to make it:

Step 1 - The Properties

Add a property with these settings:


Name: safeZoneTimer
Type: Number
Default Value: 20
Scope: Player
When value changes, transmit on: updateTimer
Broadcast on start: Yes

Also add a property called inZone, and make it a True/False, player scope, and default True.

Step 2 - Counting Down

Wire 2 wire repeaters together. Give one of them a one second delay. Connect the one with no delay to a relay set to “All Players”. Wire this to a text device with a player scope. Make this text say “Safe Zone Timer: 20” (or what time you want it to have). Add an “on wire pulse” block (Ahh! Blocks!). Put in the following code:
image

Step 3 - Updating the Text

Add a block for “When receiving on channel: updateTimer” (this should be broadcast by the property in step one), and add the code below:

Step 4 - Resetting the Timer

Add a zone device where you want your safe zone to be. Make it so gadgets cannot be fired in the zone. When a player leaves the zone, broadcast “resetSafeTimer”, and when a player enters the zone, broadcast “enterZone”. Make a block in the text device for the “resetSafeTimer” channel. Add this code:


Make a block for the “enterZone” channel. Add this code:

Step 5 - Adding Damage

Add a damager. Make a block: when receiving on channel “Damage”:


set the knockout message on the damager to something like {name} stayed in the safe zone for too long. Add a lifecycle. When a player is knocked out, broadcast on resetSafeTimer. This will reset the timer for you when you are knocked out.

This is how to make a safe timer for your battle royale game! If you have feedback for this, let me know! Thanks for reading this!

How difficult is this to make? (I’m making it the average)

  • 1/10
  • 2/10
  • 3/10
  • 4/10
  • 5/10
  • 6/10
  • 7/10
  • 8/10
  • 9/10
  • 10/10
  • 11/10
0 voters
6 Likes

Nice guide you’ve got here. Contrary to popular vote, I rated the difficulty a 3/10, as the guide includes a good amount of block code, and uses channels extensively. Great guide though, and it doesn’t use that much memory either.

3 Likes

Bump

2 Likes

Awesome guide! I rated this a 2/10. This is easy to follow and doesn’t get complicated at all!

1 Like