forcefield
Post Reply
Quote
Re: forcefield
Posted by Lan on Tue Dec 14th at 11:59pm 2004


can somebody tell me how to make forcefields like the one in hl2 where only bullets and grenades can pass?

thx

[addsig]




Quote
Re: forcefield
Posted by Nanodeath on Wed Dec 15th at 12:42am 2004


See if this can help get you started...





Quote
Re: forcefield
Posted by Lan on Wed Dec 15th at 12:57am 2004


umm i mean like this one

[addsig]




Quote
Re: forcefield
Posted by Tracer Bullet on Wed Dec 15th at 1:02am 2004


I'm sure Nanodeath has it right for the part you can't see... I'm not sure how the visual effect is achieved though. [addsig]



Quote
Re: forcefield
Posted by Lan on Wed Dec 15th at 1:06am 2004


ya i cant find it in textures and nothing comes up when zapping it with impulse 106 & 107.

my only clue is the fence is prop_dynamic.

wll thx anyway

[addsig]




Quote
Re: forcefield
Posted by Nanodeath on Wed Dec 15th at 1:09am 2004


Just type in "combine" as a search filter and it's one of the options in that (long) list. Also...for the sound of it all I remember is that it contains the word "sheild" (sic).

Hmm...I think the shield is a prop, judging by the texture name/locations.





Quote
Re: forcefield
Posted by Lan on Wed Dec 15th at 1:14am 2004


thank you dude!!! if i were gay i would kiss you!!!

[addsig]




Quote
Re: forcefield
Posted by Nanodeath on Wed Dec 15th at 1:19am 2004


Um? Yeah...right. Make sure it works first though, because it's technically a model texture and the game doesn't usually like that when you put those on brushes.



Quote
Re: forcefield
Posted by Lan on Wed Dec 15th at 1:56am 2004


darn my bullets wont pass through my shied.

any suggestions?

[addsig]




Quote
Re: forcefield
Posted by Nanodeath on Wed Dec 15th at 2:24am 2004


Are you using a prop? Otherwise just make a func_brush out of the shield, set its Solidity to Never Solid, and then create another brush over the top of it and paint it with the clip texture.



Quote
Re: forcefield
Posted by IshKaBibble on Wed Dec 15th at 2:25am 2004


make a func_illusioinary with the shield texture, then make a box the same size with the toolsplayerclip texture. VIOLA





Quote
Re: forcefield
Posted by Nanodeath on Wed Dec 15th at 2:37am 2004


func_illusionarys are obsolete...and it's "voila". Viola's an insrument



Quote
Re: forcefield
Posted by IshKaBibble on Wed Dec 15th at 2:42am 2004


func_illusionarys obsolete? i think not. i use um all the time. well not ALL the time but yea know..



Quote
Re: forcefield
Posted by Nanodeath on Wed Dec 15th at 2:43am 2004


Check the help/description of it: they're obsolete. They might work ok most of the time, but personally I'm going to stick with what they want us to use.





Quote
Re: forcefield
Posted by Lan on Wed Dec 15th at 8:29am 2004


i did the brush thing and it worked. i personally want to thank Nanodeath for being a genius and for his compassion for noobs. i salute u. [addsig]



Quote
Re: forcefield
Posted by Nanodeath on Wed Dec 15th at 8:56am 2004


ok ok you're welcome, sheesh . and for IshKaBibble, I guess you're also right. I noticed some of the objects in the de_cobble source they provided are still func_illusionarys...so maybe there isn't THAT big of a reason to use one over the other *shrug*



Quote
Re: forcefield
Posted by Yesurbius on Sat Jan 8th at 7:08pm 2005


In single player, create a brush and tie it to func_brush. Fill in the class of the NPC that is allowed to pass through it, in the "NPC Class excluded from collisions" field.

For deathmatch this does not work, so you can create a NODRAW brush and tie it to trigger_push. You can assign a filter to the trigger, only allowing certain things to pass through it. I use two brushes for my forcefields. The first one pushes at a speed of 192 - so the player can hit it without being pushed back very much at all ... and the second brush is set to a speed of 384 - so the player does get pushed back quite a bit. I do this because if a player sprints, their speed doubles and they can easily pass through a trigger_push that has a push force of 192, and yet if they walk into a trigger_push that has a force of 384, they are flung backward at a very noticable speed.

For decorations, use models/props_combine/combine_fence01a.mdl and models/props_combine/combine_fence01b.mdl on the sides .. they will generate a forcefield effect.

It provides a pretty realistic forcefield - I suppose the only thing that would be missing is that when the player hits the forcefield, the get a buzzing sound, and the forcefield has an effect on it for a few seconds ... the sound could easily be attached to the OnStartTouch output, but you are on your own for how to display a forcefield effect. The effect is in there under effects/combineshield/comshieldwall but I have not figured out how to use that yet.
[addsig]




Quote
Re: forcefield
Posted by Nanodeath on Sat Jan 8th at 7:14pm 2005


Actually there's a prefab now that makes the shield quite nicely...




Quote
Re: forcefield
Posted by Yesurbius on Sat Jan 8th at 9:06pm 2005


Now you tell me! Spent last 3 hours perfecting it for my new tutorial example map ... hehehe Where is this prefab? I could not find it in the files section.
[addsig]




Quote
Re: forcefield
Posted by SirJim on Sat Jan 8th at 9:10pm 2005


If you look in the 'HL2 prefabs' that come with Hammer there should be this forcefield. Thats where I got mine from anyhoo. Looks just like the one your after and only lets bullets and grenades through...
[addsig]





Post Reply