Waiting For Players Countdown Device
using { /Fortnite.com/Devices }
using { /Fortnite.com/UI }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/UI }
using { /Verse.org/Colors }
using { /Verse.org/Simulation }
using { /Fortnite.com/Devices }
# Define a custom log channel
log_player_wait_device := class(log_channel){}
# Message for waiting players
WaitingForPlayersMessage<localizes>(Current:int, Required:int):message = "Waiting for players: {Current}/{Required}"
CountdownMessage<localizes>(Seconds:int):message = "Game starts in: {Seconds}"
# UI class for displaying waiting message
waiting_ui := class:
var Canvas:canvas
var TextBlock:text_block
# Main class for handling player waiting and game start
player_wait_and_start := class(creative_device):
Logger:log = log{Channel:=log_player_wait_device}
@editable
MinimumPlayers:int = 2
@editable
CountdownDuration:float = 5.0
@editable
UIPosition:vector2 = vector2{X:= 0.5, Y:= 0.4}
@editable
UIAlignment:vector2 = vector2{X := 0.5, Y := 0.5}
@editable
TriggerDevice:trigger_device = trigger_device{}
var PlayerUIs:[player]?waiting_ui = map{}
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.