Instantiating a struct in Verse


using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }
using { /UnrealEngine.com/Temporary/Diagnostics }

# A Verse-authored creative device that can be placed in a level

@editable
Coordinates := struct {
    X : float = 0.0
    Y : float = 0.0
}


PickMap := class(creative_device):

    Position : Coordinates = Coordinates {
        X:=1.0,
        Y:=3.0
    }
    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        Print("Game Started")
2 Likes