winning Cinematic Device
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Device that teleports the round winner and films them with a cinematic
winner_cinematic_device := class(creative_device):
@editable
Teleporter : teleporter_device = teleporter_device{}
@editable
Cinematic : cinematic_sequence_device = cinematic_sequence_device{}
# Simulate getting the round winner (replace with your actual winner logic)
GetRoundWinner()<transacts>:?agent =
# Replace this with your actual winner retrieval logic
# For example, you might get the winner from a score manager or other device
Players := GetPlayspace().GetPlayers()
if (FirstPlayer := Players[0]):
option{FirstPlayer}
else:
false
# Teleport the winner and start the cinematic
TeleportAndFilmWinner()<suspends>:void =
if (Winner := GetRoundWinner()?):
# Teleport the winner
Teleporter.Teleport(Winner)
# Start the cinematic for the winner
Cinematic.Play(Winner)
# Example: Call this method when the round ends
OnRoundEnd()<suspends>:void =
TeleportAndFilmWinner()