Overview
The color_changing_tiles_device creates an interactive floor tile that switches color when an agent interacts with it. It's the workhorse behind classic UEFN experiences: light-up dance floors, Simon-says memory puzzles, "don't touch the red tiles" obstacle courses, and capture-the-floor team modes.
Reach for it when you want per-player, per-tile reactions on a surface. Each tile fires ActivatedEvent (handing you the agent who triggered it), and you can Enable/Disable whether it responds at all, plus Show/Hide whether it's even visible in the world. Pair several tiles with a small counter in Verse and you have a complete floor puzzle with no extra trigger devices.
API Reference
color_changing_tiles_device
Used to create a tile that changes colors when
agents interact with it.
Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).
color_changing_tiles_device<public> := class<concrete><final>(creative_device_base):
Events (subscribe a handler to react):
| Event | Signature | Description |
|---|---|---|
ActivatedEvent |
ActivatedEvent<public>:listenable(agent) |
Signaled when this device changes color. Sends the agent that interacted with this device. |
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. |
Show |
Show<public>():void |
Shows this device in the world. |
Hide |
Hide<public>():void |
Hides this device from the world. |
Walkthrough
Let's build a "light up the whole floor" puzzle. The player must step on three color-changing tiles. Each fires ActivatedEvent once; when all three have lit up, we grant a reward by enabling a prize tile and hiding the puzzle tiles so they can't be re-triggered.
floor_puzzle_device := class(creative_device):
# The three tiles the player must step on.
@editable
TileA : color_changing_tiles_device = color_changing_tiles_device{}
@editable
TileB : color_changing_tiles_device = color_changing_tiles_device{}
@editable
TileC : color_changing_tiles_device = color_changing_tiles_device{}
# A celebratory tile that stays hidden until the puzzle is solved.
@editable
PrizeTile : color_changing_tiles_device = color_changing_tiles_device{}
# How many distinct tiles have been activated.
var TilesLit : int = 0
OnBegin<override>()<suspends> : void =
# The prize tile is hidden + disabled until the puzzle is solved.
PrizeTile.Hide()
PrizeTile.Disable()
# React when each puzzle tile changes color.
TileA.ActivatedEvent.Subscribe(OnTileActivated)
TileB.ActivatedEvent.Subscribe(OnTileActivated)
TileC.ActivatedEvent.Subscribe(OnTileActivated)
# Handler method — ActivatedEvent hands us the agent that interacted.
OnTileActivated(Agent : agent) : void =
set TilesLit += 1
Print("A tile lit up! Total: {TilesLit}")
if (TilesLit >= 3):
SolvePuzzle()
SolvePuzzle() : void =
# Lock the puzzle tiles so they no longer respond.
TileA.Disable()
TileB.Disable()
TileC.Disable()
# Reveal and arm the prize tile.
PrizeTile.Show()
PrizeTile.Enable()
Print("Floor puzzle solved!")
Line by line:
@editable TileA : color_changing_tiles_device = color_changing_tiles_device{}— declares a field you bind to a placed tile in the UEFN Details panel. You MUST do this for every device you call; a bareTile.Enable()on an unbound device fails with "Unknown identifier".var TilesLit : int = 0— our puzzle progress counter, mutable withset.- In
OnBegin,PrizeTile.Hide()andPrizeTile.Disable()make the reward tile invisible and non-interactive at game start. TileA.ActivatedEvent.Subscribe(OnTileActivated)— subscribes our method to each tile's color-change event.ActivatedEventislistenable(agent), so the handler signature must accept anagent.OnTileActivated(Agent : agent) : void— runs each time any subscribed tile is interacted with. We bump the counter and check for completion.SolvePuzzle()callsDisable()on the puzzle tiles (so they stop firing) andShow()+Enable()on the prize tile to reveal the reward.
Common patterns
1. Hide a tile until a player triggers another (Hide / Show)
A secret tile that only appears after the player steps on a starter tile.
secret_tile_device := class(creative_device):
@editable
StarterTile : color_changing_tiles_device = color_changing_tiles_device{}
@editable
SecretTile : color_changing_tiles_device = color_changing_tiles_device{}
OnBegin<override>()<suspends> : void =
SecretTile.Hide()
StarterTile.ActivatedEvent.Subscribe(OnStarterStepped)
OnStarterStepped(Agent : agent) : void =
# Reveal the hidden tile once the starter is activated.
SecretTile.Show()
2. Disable a tile after one use (Disable)
A one-shot tile — useful for "first player to reach the floor" races.
one_shot_tile_device := class(creative_device):
@editable
GoalTile : color_changing_tiles_device = color_changing_tiles_device{}
OnBegin<override>()<suspends> : void =
GoalTile.ActivatedEvent.Subscribe(OnGoalReached)
OnGoalReached(Agent : agent) : void =
# Lock the tile so nobody else can claim it.
GoalTile.Disable()
Print("Goal tile claimed!")
3. Unwrap the activating agent to react per-player
The handler always receives an agent directly (not an ?agent), so you can use it immediately — for example, to look up the player's name.
per_player_tile_device := class(creative_device):
@editable
DanceTile : color_changing_tiles_device = color_changing_tiles_device{}
OnBegin<override>()<suspends> : void =
DanceTile.ActivatedEvent.Subscribe(OnDanced)
OnDanced(Agent : agent) : void =
# Try to get a player from the agent for per-player logic.
if (Player := player[Agent]):
Print("A player activated the dance tile!")
else:
Print("A non-player agent activated the tile.")
Gotchas
- You must declare an
@editablefield and bind it in UEFN. Callingcolor_changing_tiles_device{}.Enable()on a literal does nothing; the field has to point at a tile you placed in the level via the Details panel. ActivatedEventhands you a bareagent, not an?agent. Unlike some event signatures, you do NOT needif (A := Agent?). UseAgentdirectly. If you want aplayer, cast it:if (Player := player[Agent]):.Disable()vsHide()are different.Disable()keeps the tile visible but stops it responding to interactions;Hide()removes it from the world visually. A hidden tile may still be enabled — call both if you want it fully gone and inert.- A disabled tile won't fire
ActivatedEvent. If your subscribed handler suddenly stops running, check you didn'tDisable()the tile earlier in your flow. - Subscribe inside
OnBegin, and make handlers methods at class scope. Event handlers likeOnTileActivatedare declared at 4-space indentation as class methods, and you wire them up with.Subscribe(...)inside the 8-spaceOnBeginbody. setis required to mutatevarfields. WritingTilesLit += 1withoutsetwon't compile — useset TilesLit += 1.