using { /Fortnite.com/Game } # This is our main script. Think of it as the "Brain" of our island. script MatchStatusController: VerseScript() # We need a reference to our Text Prop so we can change its text. # In Verse, we bind this in the editor, but for this example, # we'll assume we have a way to access it. # Note: In a real script, you'd typically get the entity by name or reference. StatusTextProp: TextProp = TextProp{} # This function runs when the round STARTS. # It's our "Callback" - the promise we made to the game engine. OnRoundStart(): void = # Change the text to show the match has begun. StatusTextProp.SetText("MATCH STARTED!") # You could also play a sound, spawn loot, etc. here. print("Round has started! The game is live.") # This function runs when the round ENDS. OnRoundEnd(): void = # Change the text to show the match is over. StatusTextProp.SetText("MATCH OVER") print("Round has ended. Cleaning up...") # This is where we set up our subscriptions. # It runs once when the script initializes. OnBeginScript(): void = # First, we need to find the Round Manager. # Think of this as finding the "Referee" of the match. if (RoundManager := Entity.GetFortRoundManager[]): # Subscribe to the Round Start event. # We pass our OnRoundStart function as the callback. # The game will call OnRoundStart() when the round begins. RoundManager.SubscribeRoundStarted(OnRoundStart) # Subscribe to the Round End event. # We pass our OnRoundEnd function as the callback. RoundManager.SubscribeRoundEnded(OnRoundEnd) print("Subscribed to round events. Waiting for match to start...") else: print("Error: Could not find Round Manager.")