Making An entity be seen through everything(Sorta like a wall hack)

I’m wanting my entity to be seen through everything so that people can find it but i don’t want to go scavenging around in a wall hack addon so if some one could link me a wiki page that i might have missed or just tell me how to do it i would be grateful.

Well there’s your problem.

We’ll generally most of those have a lot more going on and i’m not sure what i’m looking for to do this, and since most people here at FacePunch do it would be much easier to just post a question on what to use rather then dig around. If i have to i will though but i’ll give this thread some time.

Give this a try.

Ok i sort of understand the stencil. How would i make it so that it goes over brushes like func_detail?

This is what you want.

We’ll thanks for the link it helped me with stencils but im still not able to make my entity seen through the world.

Did you check out the last example on the second page? Because it pretty much does that.

well i tried that but it just made everything invisible

If you want to see entitys visible through everything use,
Create a material,
and use.



"$ignorez" 1


also,
I tried using stencil’s,
I can’t get them to work.

[lua]
render.SetStencilEnable(true)

render.SetStencilCompareFunction(STENCILCOMPARISONFUNCTION_ALWAYS)
render.SetStencilZFailOperation(STENCILOPERATION_REPLACE)
render.SetStencilReferenceValue(1)

–Render stuff that should be seen through walls (:DrawModel)

render.SetStencilZFailOperation(STENCILOPERATION_KEEP)
render.SetStencilCompareFunction(STENCILCOMPARISONFUNCTION_EQUAL)

render.SetMaterial(someMat)
render.DrawScreenQuad()

render.SetStencilEnable(false)
[/lua]

someMat should preferably be an UnlitGeneric material (else it’ll be butt ugly)

you can download some wallhack from gmod.org and look trough the lua code and you will see how they made it.