Verse Library verse

01 Fragment

Automatically spawns collectible items at set intervals or when players collect previous ones.

verse-library/using-fish-consumables-in-fortnite-creative/01-fragment.verse

# 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<override>()<suspends>:
        # Start the timer now!
        # It will wait 5 seconds.
        MyTimer.Start(5.0)

    # This function runs when the Timer finishes.
    OnTimerDone<override>()<suspends>:
        # 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.

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.

Sign in with Discord

Comments

    Sign in to vote, comment, or suggest an edit. Sign in