# This is our main script file using { /Fortnite.com/Devices } using { /Fortnite.com/Devices/Timer } using { /Fortnite.com/Devices/Player } # We create a "Device" called FishSpawner. # Think of this as the box that holds our code. FishSpawner = device: # This is the Timer device. # It counts down seconds. MyTimer = timer: # This is the spot where fish appear. # We call this a "Spawn Point". SpawnLocation = location: # This function runs when the game starts. OnBegin(): # Start the timer now! # It will wait 5 seconds. MyTimer.Start(5.0) # This function runs when the Timer finishes. OnTimerDone(): # 1. Create a new fish item. # We pick "Shield Fish" for this example. NewFish := Item.Create(ShieldFish) # 2. Put the fish at our SpawnLocation. # Imagine dropping it from the sky. NewFish.Place(SpawnLocation) # 3. Start the timer again! # This makes the fish come back later. MyTimer.Start(5.0) # This function runs when a player touches this device. OnPlayerBeginOverlap(other: Player): # Check if the player is close enough. # If yes, give them a fish! # Note: We also restart the timer here. MyTimer.Start(0.0) # Reset timer immediately