Verse Library verse

01 Device

Consumes recipe items and grants rewards when button conditions are met.

verse-library/using-food-crafting-items-in-fortnite-creative/01-device.verse

# This is our crafting station script
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/FortPlayerUtilities }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# We create a new device called "CraftingStation"
crafting_station := class(creative_device):

    # This is the button that checks the items
    # We link it to the Conditional Button in the editor
    @editable
    my_button : conditional_button_device = conditional_button_device{}

    # This is the item we give to the player when the recipe is complete
    # We link it to an Item Granter in the editor
    @editable
    my_granter : item_granter_device = item_granter_device{}

    # This is the item remover for the first ingredient (Herb)
    # Set its item type to Herb in the editor, quantity 1
    @editable
    herb_remover : item_remover_device = item_remover_device{}

    # This is the item remover for the second ingredient (Wheat)
    # Set its item type to Wheat in the editor, quantity 1
    @editable
    wheat_remover : item_remover_device = item_remover_device{}

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