Is there anyway to remove a halo from a entity?

I figured out how to draw a halo around a entity, and I wanted to know if there was a way to remove the halo without removing the entity itself?

I already tried redrawing the halo with a color that included an alpha of 0, but it is still visible:

Maybe this is because I still set it to draw the halo through everything? I would think there’s a way to completely remove the halo, but I don’t see anything on the wiki. Even if I set to not draw through everything, it is still visible.

Thanks for any help.

You don’t “remove” a halo. Halos exist only when you ask them to, for a single drawn frame. The code where you run halo.Add only tells the game to render the halo once; you placed that code in a hook that runs every frame, hence the halo being drawn every frame.

To stop drawing the halo… don’t run the code that draws the halo.

You just stop calling the halo.Add function.



hook.Add("PreDrawHalos", "!!!", function()
    if (DrawHalo) then
        halo.Add(...)
    end
end)


EDIT:

shit, ninja’d

Ah, okay. I see. That’s simple. :speechless: Appreciate it.