# Import the basic framework for Verse
using /Fortnite.com/Devices
# This is our "Device Class". It’s like a blueprint for our Spooky Trap.
# We are telling Verse: "I want to control a Post Process device."
spooky_trap := class(device):
# This is a VARIABLE. Think of it as a storage box.
# We store the Post Process device here so we can talk to it.
# It's like pointing at the sunglasses and saying "You, I'm talking to you."
filter_device: PostProcessDevice = PostProcessDevice{}
# This is an EVENT. It’s like a button press.
# When a player enters the trigger zone, this function runs.
OnBegin<override>()<suspends>: void=
# Wait for the device to be ready (just like waiting for the bus)
await GetWorld().GetTimer().Wait(0.0)
# Connect the "On Player Enters" event to our function
# This is like wiring a switch to a light bulb.
# When someone steps on the rug, 'HandlePlayerEnter' gets called.
self.GetTrigger().OnPlayerEnter += HandlePlayerEnter
self.GetTrigger().OnPlayerLeave += HandlePlayerLeave
# This function runs when a player steps IN.
HandlePlayerEnter := func(player: Player): void=
# Activate the filter!
# We are calling the 'Activate' function on our stored device.
# It’s like putting on the sunglasses.
filter_device.Activate()
Verse Library
verse
01 Standalone
Activates or deactivates a post-process visual filter when players step into or out of a trigger zone.
verse-library/using-post-process-devices-in-fortnite-creative/01-standalone.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.