# This is a simple Verse script for Island Settings # It runs when the game starts using { /Fortnite.com/Devices } using { /Verse.org/Simulation } using { /Verse.org/Native } # We define a class that holds a reference to our island settings device. # In UEFN, you bind devices by placing this class as a Verse device # in the level and wiring the property in the Details Panel. my_first_settings := class(creative_device): # This property is wired to the Island Settings device in the editor. @editable IslandSettings : island_settings_device = island_settings_device{} # OnBegin runs automatically when the game session starts. OnBegin() : void = # Set the max players to 4 # note: island_settings_device exposes SetMaxPlayers() for runtime # control of the player cap. IslandSettings.SetMaxPlayers(4) # Set team size to 4 # note: cooperative vs. competitive mode is configured in the # Island Settings device Details Panel; there is no SetTeams() API. IslandSettings.SetTeamSize(4) # Print a message to the output log # This helps us know the code ran Print("Game rules are set!")