Reference Devices compiles

color_changing_tiles_device: Floor Puzzles That React to Players

The color_changing_tiles_device is the little floor tile that flips color when a player walks over or interacts with it — the building block of memory puzzles, lava-floor challenges, and dance-floor mini-games. In this article you'll wire its real Verse API (ActivatedEvent, Enable, Disable, Show, Hide) into a working puzzle that rewards a player for stepping on every tile.

Updated Examples verified on the live UEFN compiler
Watch the Knotcolor_changing_tiles_device in ~90 seconds.

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 bare Tile.Enable() on an unbound device fails with "Unknown identifier".
  • var TilesLit : int = 0 — our puzzle progress counter, mutable with set.
  • In OnBegin, PrizeTile.Hide() and PrizeTile.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. ActivatedEvent is listenable(agent), so the handler signature must accept an agent.
  • OnTileActivated(Agent : agent) : void — runs each time any subscribed tile is interacted with. We bump the counter and check for completion.
  • SolvePuzzle() calls Disable() on the puzzle tiles (so they stop firing) and Show() + 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 @editable field and bind it in UEFN. Calling color_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.
  • ActivatedEvent hands you a bare agent, not an ?agent. Unlike some event signatures, you do NOT need if (A := Agent?). Use Agent directly. If you want a player, cast it: if (Player := player[Agent]):.
  • Disable() vs Hide() 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't Disable() the tile earlier in your flow.
  • Subscribe inside OnBegin, and make handlers methods at class scope. Event handlers like OnTileActivated are declared at 4-space indentation as class methods, and you wire them up with .Subscribe(...) inside the 8-space OnBegin body.
  • set is required to mutate var fields. Writing TilesLit += 1 without set won't compile — use set TilesLit += 1.

Device Settings & Options

The color_changing_tiles_device User Options panel in the UEFN editor — every setting you can tune.

Color Changing Tiles Device settings and options panel in the UEFN editor — Revert Tile, Time Until Reverting, Score, Steal Score
Color Changing Tiles Device — User Options in the UEFN editor: Revert Tile, Time Until Reverting, Score, Steal Score
⚙️ Settings on this device (4)

Setting names read from the panel above — may be partial; the screenshots are the source of truth.

Revert Tile
Time Until Reverting
Score
Steal Score

Guides & scripts that use color_changing_tiles_device

Step-by-step tutorials that put this object to work.

Build your own lesson with color_changing_tiles_device

Generate a personalized, step-by-step lesson plan built around this object — grounded in this exact reference and our compile-verified knowledge base.

Build a lesson →