SOLVED - How do you add a new verse device to an empty level?

I click build verse scripts and nothing happens. Seems like the only way is to start an entirely new project using the project templates.

SOLUTION- Go to tools => Verse Explorer => Create new verse file!
Shoutout to [ZEN] Kamui for providing the solution!
:smiley:

Hi @TheAweDam:

You can always define a new device as long as you create the definition of a class that inherits from creative_device in some way. You don’t need a separate Verse script file on-disk. For example, the following code:


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

# A Verse-authored creative device that can be placed in a level
# 
# Getting started:
#     https://www.epicgames.com/fortnite/en-US/creative/docs/uefn/Verse/onboarding-guide-to-programming-with-verse-in-unreal-editor-for-fortnite
#
hello_world_device := class(creative_device):

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        # TODO: Replace this with your code
        Print("Hello, world!")
        Print("2 + 2 = {2 + 2}")


hello_world_device_2 := class(creative_device):

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        # TODO: Replace this with your code
        Print("Hello, world, again!")

Will automatically generate a new Verse device class in the Content Browser that you can then drag-and-drop into your level:

image

You can, of course, define as many devices as you’d like within one .verse file or spread them out across multiple files as you’d like for organization purposes.

1 Like

Thank you!!

Also covered in this tutorial: