Wire Outlining

I was wondering how Wiremod gets it’s entities to have a black/white outline. I tried looking through the client files, but the only thing I could really find was ent.SetRenderBounds, but after looking at the wiki, I didn’t really get how it worked or what it did. And both SetRenderBounds and SetRenderWSBounds have the same example and both are different. So can anyone help?

[lua]self:DrawEntityOutline( thickness ) --thickness is how many world units thick the outline should be[/lua]

Try that.

Well, I tried ent.DrawEntityOutline(10) and apparently there’s no such function

It needs to be called in the Entities draw function:

[lua]function ENT:Draw()

Do I have to give an actual entity to ENT and can it be replaced? Does it always get called too? Im very new to lua :stuck_out_tongue:

If you are not making your own scripted entity (SENT) then you can’t do this easily. The ENT table is a structure that is filled with functions (and variables) that define how your scripted entity should behave.


Here is an example SENT. As you can see it uses the ENT table.

Do you mean when looking at them?
To do that set the base to base_gmodentity.