Skip to content

X-Ray & Highlight

Older/Work In Progress Page

  • This page was initially written for an older version of Helix, has not been updated, and may be out of date!
  • Contributions are more than welcome (see buttons at the top right of the page).

This sample code shows how to set Actors to be highlighted when behind walls, or always highlighted!

Tip

As highlighting is something calculated in Post Processing, it is really hard to define custom colors for individual entities.

Fortunately HELIX supports having 3 different colors which you can configure yourself!

To configure the global Highlight color for a specific index, use:#

Client.SetHighlightColor(highlight_color, index, mode)

To enable the Highlight to a specific actor, use:#

my_entity:SetHighlightEnabled(true, index)

Info

Valid indexes are 0, 1 and 2.

Client/Index.lua
-- Sets the Global desired Highlight color
-- Higher color values make it glow (e.g. Color(100, 0, 0))
local highlight_color = Color(10, 2.5, 0)
Client.SetHighlightColor(highlight_color, 0, HighlightMode.Always)

-- Setting all Characters to highlight
Character.Subscribe("Spawn", function(character)
    character:SetHighlightEnabled(true, 0)
end)