# This is our script for the Lava Eliminator
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/SpatialMath }
# We define a function called "Eliminate"
# This function takes a Player as an input
Eliminate := func(player: Player):
# This line tells the player they are eliminated
player.Eliminate()
# This line plays a sound effect (optional)
player.PlaySound("Elimination_Sound")
# This is our Event
# It happens when a player lands on a device
On_Land := func(device: Device, player: Player):
# Check if this is the WRONG platform
# We use a Variable to remember the correct platform
if (device != Correct_Platform):
# Call the Eliminate function
Eliminate(player)
# Also, hide the wrong platform so it looks like it broke
device.Hide()
# We need to know which platform is correct
# This is a Constant. It never changes.
Correct_Platform := GetDevice("Platform_1")
# Connect the event to the devices
# When any platform is landed on, run On_Land
On_Land_Event := On_Land
Verse Library
verse
01 Fragment
Triggers elimination and platform hiding when players land on incorrect zones.
verse-library/throw-losers-into-lava/01-fragment.verse