using /Fortnite.com/Devices
using /Engine/Systems/NiagaraSystem
# Define our device
SparkleDevice = class(creative_device):
# This is the Niagara System we created earlier
# Think of this as the 'Inventory Slot' for our VFX
SparkleSystem: niagara_system = resource()
# This function runs when the device starts
OnBegin<override>()<suspends>: void = async:
# Wait for the game to start
await GetWorld().BeginPlay()
# Loop forever (like a respawn timer that never ends)
while true:
# Wait 2 seconds between bursts of sparkles
await Task.Delay(2.0)
# Play the system at the device's location
# This is like pressing the 'Fire' button on a weapon
SparkleSystem.PlayAt(GetLocation())
# Optional: Stop the system after 1 second so it doesn't loop infinitely
await Task.Delay(1.0)
SparkleSystem.Stop()
Verse Library
verse
01 Device
Creates a creative device that continuously plays and stops a Niagara sparkle effect on a loop.
verse-library/niagara-flipbook-baker-quick-start/01-device.verse