Verse Library verse

01 Device

Instantly spawns a single item by calling the device method when the island loads.

verse-library/verse-devices-functions/01-device.verse

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

machine := class(creative_device):

    @editable
    Spawner : item_spawner_device = item_spawner_device{}

    OnBegin<override>()<suspends> : void =
        # SpawnItem takes nothing. Just: "drop one item, now."
        Spawner.SpawnItem()

Comments

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