Overview
The hud_controller_device is an invisible rules device. In its Details panel you choose which HUD elements (minimap, elimination counter, round timer, resource counts, etc.) are shown or hidden, and which players it applies to via its Affected Class and Affected Team options. By itself it just sits there enforcing those settings. Verse is where it gets interesting: you can Enable and Disable the device on cue, and — the powerful part — you can retarget it at runtime by calling UpdateAffectedClass(Agent) or UpdateAffectedTeam(Agent) so the rules suddenly apply to that agent's class or team.
Reach for this device when different groups of players should see different information. A classic example: a hide-and-seek mode where seekers get a minimap but hiders don't, or a spectator class that loses the elimination feed. You configure the what (which elements) in the editor, and use Verse to control the who and the when.
The device exposes six methods and no events. Enable/Disable turn its rule-set on and off. UpdateAffectedClass/UpdateAffectedTeam point the rules at a specific agent's class/team. ResetAffectedClass/ResetAffectedTeam snap those options back to whatever you set in the editor.
API Reference
hud_controller_device
Used to show or hide parts of the HUD for players or teams. Use this with other devices such as the
hud_message_device,map_indicator_device, andbillboard_deviceto control exactly how much information players can see during a game, as well as how and when they see that information.
Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).
hud_controller_device<public> := class<concrete><final>(creative_device_base):
Methods (call these to make the device act):
| Method | Signature | Description |
|---|---|---|
Enable |
Enable<public>():void |
Enables this device. |
Disable |
Disable<public>():void |
Disables this device. |
UpdateAffectedClass |
UpdateAffectedClass<public>(Agent:agent):void |
Sets the Affected Class option to Agent's class. |
UpdateAffectedTeam |
UpdateAffectedTeam<public>(Agent:agent):void |
Sets the Affected Team option to Agent's team. |
ResetAffectedClass |
ResetAffectedClass<public>():void |
Resets the Affected Class option to its starting value. |
ResetAffectedTeam |
ResetAffectedTeam<public>():void |
Resets the Affected Team option to its starting value. |
Walkthrough
Let's build a "Hunter Vision" mechanic. When a player steps on a button, that player becomes the Hunter: a HUD Controller (configured in the editor to show the minimap and tracker elements) is retargeted to the Hunter's class and enabled, so only the Hunter sees the extra HUD. A second button ends the hunt — we disable the controller and reset its affected class back to the editor default.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# A Verse-authored device that grants "Hunter Vision" HUD to one player.
hunter_vision := class(creative_device):
# The HUD Controller. In its Details panel, set it to SHOW the minimap /
# tracker elements, and set Affected Class to the Hunter class.
@editable
HunterHUD:hud_controller_device = hud_controller_device{}
# Button a player presses to become the Hunter.
@editable
BecomeHunterButton:button_device = button_device{}
# Button that ends the hunt and clears the special HUD.
@editable
EndHuntButton:button_device = button_device{}
# Runs when the game starts.
OnBegin<override>()<suspends>:void =
# Start with the special HUD off so nobody sees it yet.
HunterHUD.Disable()
# Wire up the two buttons to their handlers.
BecomeHunterButton.InteractedWithEvent.Subscribe(OnBecomeHunter)
EndHuntButton.InteractedWithEvent.Subscribe(OnEndHunt)
# Called when a player interacts with the "become hunter" button.
OnBecomeHunter(Agent:agent):void =
# Point the HUD rules at THIS agent's class...
HunterHUD.UpdateAffectedClass(Agent)
# ...then turn the rules on. Now only that class sees the extra HUD.
HunterHUD.Enable()
# Called when a player ends the hunt.
OnEndHunt(Agent:agent):void =
# Turn the rules off for everyone...
HunterHUD.Disable()
# ...and restore the Affected Class option to its editor value.
HunterHUD.ResetAffectedClass()
Line by line:
- The two
@editablebutton_devicefields plus thehud_controller_devicefield let us hook up real placed devices in UEFN. The HUD Controller's element choices (show minimap, show tracker) live in its Details panel — Verse never lists them; it only controls targeting and on/off. - In
OnBegin,HunterHUD.Disable()makes sure the special HUD is dormant at match start. BecomeHunterButton.InteractedWithEvent.Subscribe(OnBecomeHunter)registers a method to run whenever someone presses that button. Subscriptions belong inOnBegin; the handlers are methods at class scope.InteractedWithEventhands the handler theagentwho pressed the button. BecauseUpdateAffectedClasstakes a plainagent, we can pass it straight through — no option unwrap needed here.OnBecomeHuntercallsUpdateAffectedClass(Agent)to retarget the device to that player's class, thenEnable()to switch the rules live.OnEndHuntcallsDisable()to stop showing the elements, thenResetAffectedClass()so the device forgets the runtime target and goes back to whatever class you picked in the editor.
Common patterns
Team-wide HUD on a captured point
Use UpdateAffectedTeam so an entire team gets (or loses) HUD elements. Here, whoever captures a zone makes their whole team the affected team.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
team_hud_on_capture := class(creative_device):
# HUD Controller configured (in editor) to show team-relevant elements.
@editable
TeamHUD:hud_controller_device = hud_controller_device{}
# Capture area that fires when a team takes the point.
@editable
CapturePoint:capture_area_device = capture_area_device{}
OnBegin<override>()<suspends>:void =
TeamHUD.Disable()
# ControlChangedEvent reports the agent now controlling the area.
CapturePoint.ControlChangedEvent.Subscribe(OnControlChanged)
OnControlChanged(Agent:agent):void =
# Retarget the HUD rules to the capturing agent's TEAM, then enable.
TeamHUD.UpdateAffectedTeam(Agent)
TeamHUD.Enable()
Reset everything when a round ends
When a round timer ends, wipe runtime targeting back to editor defaults and turn the device off — a clean slate for the next round.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
round_hud_reset := class(creative_device):
@editable
RoundHUD:hud_controller_device = hud_controller_device{}
# A timer device that signals when the round is over.
@editable
RoundTimer:timer_device = timer_device{}
OnBegin<override>()<suspends>:void =
RoundTimer.SuccessEvent.Subscribe(OnRoundOver)
OnRoundOver(Agent:?agent):void =
# Clear both runtime targets, then disable the device.
RoundHUD.ResetAffectedClass()
RoundHUD.ResetAffectedTeam()
RoundHUD.Disable()
Note timer_device.SuccessEvent hands a ?agent (optional). We don't need the agent here, so we accept it as ?agent and simply don't unwrap it.
Gotchas
- Verse can't pick the HUD elements. Which elements (minimap, eliminations, resources…) are shown or hidden is set entirely in the device's Details panel. Verse only controls
Enable/Disable, who it affects (UpdateAffected…), and resetting that targeting. If you need fine-grained per-element control from code, that's thefort_hud_controllerinterface viaGetPlayspace().GetHUDController()— a different API from this placed device. Disablehides the rules, not necessarily the HUD elements themselves. Disabling the device stops it from enforcing its show/hide settings; the underlying HUD reverts to whatever other devices or the default game mode dictate. Use a second HUD Controller for the "normal" state if you're toggling between two HUD layouts (as Epic's title-sequence pattern does).UpdateAffectedClassvsUpdateAffectedTeamare independent. Setting one does not touch the other, and the device combines both filters. If your rules aren't applying to who you expect, check whether a leftover Affected Team is narrowing the set — callResetAffectedTeam()to clear it.- You must declare the device as an
@editablefield. Callinghud_controller_device{}.Enable()on a bare literal does nothing useful — it isn't the placed device. Drag your real HUD Controller onto the@editableslot in UEFN. - No events to subscribe to. This device has zero events. Drive it from other devices' events (buttons, capture areas, timers) as shown above.
Resetneeds a starting value to return to.ResetAffectedClassandResetAffectedTeamrestore the option to whatever you configured in the editor. If you left those blank in the Details panel, the reset clears targeting to 'no specific class/team' — which usually means it affects all players.