Verse Library verse

01 Fragment

Defines a custom device that prints a startup message and optionally sets a material when the session begins.

verse-library/opaque-barrier/01-fragment.verse

# This is a simple Verse file.
# It shows how a device can be ready.

using { /Fortnite.com/Devices }

# We create a new device type called "SecretWall".
# This is like a blueprint for our barrier.
actor SecretWall(actor):
    # This function runs when the game starts.
    OnBegin<override>()<suspends>: void =>
        # We print a message to the screen.
        # This helps us know the wall is working.
        Print("My secret wall is ready!")

        # We can also change the wall color here.
        # This is optional, but fun to try.
        # SetMaterial("Stone")

Comments

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