# This is the "Header" - it tells the game what tools we need.
# Think of it like opening your loadout menu before a match.
uses /Fortnite.com/Devices
# We define a new "Script" called FuelTrapScript.
# This script will be attached to our Fuel Pump device.
script FuelTrapScript(Owner: actor) is
# --- CONSTANTS (The Setup) ---
# These are set once when the game starts.
# Think of this like setting the match timer to 20 minutes.
readonly MaxDamageThreshold := 50.0 # If hit for more than this, boom.
readonly ExplosionDamage := 100.0 # How much damage the explosion does.
# --- VARIABLES (The State) ---
# These change during the game.
# Think of this like a player's current ammo count.
var isDestroyed := false # Has the pump been blown up yet?
# --- EVENTS (The Triggers) ---
# This function runs automatically when the pump takes damage.
# It's like the "Elimination" notification popping up on your screen.
OnDamageReceived(Damage: float, Source: actor, Instigator: actor) is
# Check if we've already blown up this pump.
# If isDestroyed is true, we do nothing.
if (isDestroyed) then
return # Exit the function early. Like skipping a cutscene.
end
# Check if the source of the damage is the pump itself (self-damage)
# or if it's a player.
Verse Library
verse
01 Fragment
Triggers a one-time explosion when a device receives sufficient damage.
verse-library/using-fuel-pump-devices-in-fortnite-creative/01-fragment.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.