How do I create a patch without hitscan?


(PSIonic) #1

Hi.

I’ve made a fence which is a patch with a standard alpha texture on it. The alpha texture works fine when placed on a standard brush, but when applied on my patch it blocks bullets one way. How can I prevent it from blocking bullets and any other weapon fire both ways?


(Wils) #2

You need to give it a nonsolid shader such as this one:

textures/snow_sd/mesh_c03_snow
{
	qer_alphafunc gequal 0.5
	cull none
	nomipmaps
	nopicmip
	surfaceparm alphashadow
	surfaceparm nomarks
                surfaceparm nonsolid
	surfaceparm trans
	implicitMask -
}

(Wils) #3

Actually looking at it that’s a really poor example :slight_smile:

You should have it block the player and any missile type projectiles (rockets, grenades) but not bullets. For that you can either just cover the fence in common/clipmissile, or add

surfaceparm clipmissile

to the shader with the other shaderparms.


(PSIonic) #4

The shader I’m currently using is called alpha/fence_c11
Like I said, it seems to work fine when placed on a brush so it must have a script like the one you mentioned attached to it. Is there some hardcoding in ET possibly which prevents patches from not performing hitscan on the side which is visible in the editor?

I am going to try your script tomorrow when I get home in case it is better than the current shader’s. Thanks for that :drink: