Display UI Widgets Directly to Players
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/UI }
using { /Verse.org/Random }
WidgetType := enum:
# Add widget types here
MapCode
Score
CustomWidget := enum:
Add
Remove
UpdateData
MyUI<public>:= module: # MyUI Folder name in content browser - Change for your main ui folder and any sub folders
MapCode<public>:=module{} # Sub folder that the MapCode widget is inside
UI_Device := class(creative_device):
var PlayerWidgetMap : [player][WidgetType]widget = map{}
#################### Examples ####################
# Single Player
# Add -> UpdateWidgetForPlayer(Player, WidgetType.AwaitingPlayers, CustomWidget.Add)
# Remove -> GM.UIDevice.UpdateWidgetForPlayer(Player, WidgetType.AwaitingPlayers, CustomWidget.Remove)
# All Players
# Add
# AllPlayers := GetPlayspace().GetPlayers()
# UpdateWidgetForAllPlayers(AllPlayers, WidgetType.LikeAndFav, CustomWidget.Add)
# Remove
# AllPlayers := GetPlayspace().GetPlayers()
# UpdateWidgetForAllPlayers(AllPlayers, WidgetType.LikeAndFav, CustomWidget.Remove)
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.