using { /Fortnite.com/Devices } using { /Fortnite.com/Game } using { /Fortnite.com/UI } using { /UnrealEngine.com/Temporary/UI } using { /UnrealEngine.com/Temporary/Diagnostics } using { /Verse.org/Simulation } # This is our main script class. # It runs when the game starts. welcome_message_device := class(creative_device): # This runs once when the island loads. OnBegin() : void = # 1. Get the player's screen (The Player UI). # We find the first player in the game. # GetPlayspace() returns all active players on this island. Players := GetPlayspace().GetPlayers() # Guard against an empty lobby before continuing. if (Player := Players[0], FortPlayer := player[Player], PlayerUI := GetPlayerUI[FortPlayer]): # 3. Create a new text_block Widget. # This is our "sticker" with text. MyText := text_block: DefaultText := StringToMessage("Welcome to my Island!") # 4. Add the widget to the player's UI. # This makes it appear on screen! # slot controls layer order; use default_z_order (0) here. PlayerUI.AddWidget(MyText, player_ui_slot{ZOrder := 0}) # 5. Wait for 3 seconds. # The game pauses here for a moment. Sleep(3.0) # 6. Remove the widget from the UI. # This makes the sticker disappear. PlayerUI.RemoveWidget(MyText)