This tutorial is designed to help you create a force field which blocks a player from entering another area. The one shown here is the simplest possible field. Also, this field can be switched on and off.
I assume you have a working knowledge of what lasers are and how you make them. Click here to search this site for them.
First you create a grid of lasers around the region you want to put the force fields in. For example:
----------
|| ^ ^ ^ ||
|| ^ ^ ^ ||
||======||
|| ^ ^ ^ ||
||======||
|| ^ ^ ^ ||
||======||<-Walls
|| ^ ^ ^ ||
|| ^ ^ ^ ||
----------
where the === and ^ are lasers.
Give all the env_beam entities the same name. I would suggest you set the lasers' charecteristics as follows:
Name: (it's easier if all of them have the same name)
Start entity: (as it should be for you)
Ending entity: (as it should be for you)
Render FX: normal
Brightness: (however you like it, the higher the better)
Beam color: (I suggest you use the same color for all the beams, looks better)
Radius: (default value should do)
Life: 0
Width of beam: (however you like it)
Amount of noise: (adjust this till the beams flicker about enough to fill the gap you want entirely)
Sprite name: (default is good, a custom sprite might be better...)
Texture scroll rate: around 100
Frames per 10 seconds: (adjust this to your liking)
Damage/second: 0
In the flags tab check the boxes for "Start On" and "Toggle"
Once you are done it should look similar to this.:
Then, create a brush with the aaatrigger texture such that it covers the entire field region and make it a trigger_hurt entity. Give it the same name as the env_beam entities. Set the damage to any value you want- if you set it too low, a player can gaussjump right through the field, so i suggest 34875346593874 or so!
If you had set the damage/second of the env_beam to anything but 0, you would have got unpredictable results when the player came near the beam. With luck, a player might have escaped the beams entirely. With this, his chances of doing so are very low.
Finally- this is important- create two brushes, with the aaatrigger texture, such that each of them sticks out a little to one side over the trigger_hurt brush. Convert each of them to a trigger_push entity so that when a player walks into the field from one direction he gets pushed back in the direction he came from. Set the direction of push by putting the angle compass (The clock-like thingy) to the direction of push in the "2D top" view. Give them both the name of the env_beam entities.
And dont forget to add a button. In the target field put the common name of all the entities which you gave the same name(the env_beams, trigger_push, trigger_hurt).
And there you have a working, toggle-able force field:

I assume you have a working knowledge of what lasers are and how you make them. Click here to search this site for them.
First you create a grid of lasers around the region you want to put the force fields in. For example:
----------
|| ^ ^ ^ ||
|| ^ ^ ^ ||
||======||
|| ^ ^ ^ ||
||======||
|| ^ ^ ^ ||
||======||<-Walls
|| ^ ^ ^ ||
|| ^ ^ ^ ||
----------
where the === and ^ are lasers.
Give all the env_beam entities the same name. I would suggest you set the lasers' charecteristics as follows:
Name: (it's easier if all of them have the same name)
Start entity: (as it should be for you)
Ending entity: (as it should be for you)
Render FX: normal
Brightness: (however you like it, the higher the better)
Beam color: (I suggest you use the same color for all the beams, looks better)
Radius: (default value should do)
Life: 0
Width of beam: (however you like it)
Amount of noise: (adjust this till the beams flicker about enough to fill the gap you want entirely)
Sprite name: (default is good, a custom sprite might be better...)
Texture scroll rate: around 100
Frames per 10 seconds: (adjust this to your liking)
Damage/second: 0
In the flags tab check the boxes for "Start On" and "Toggle"
Once you are done it should look similar to this.:

Then, create a brush with the aaatrigger texture such that it covers the entire field region and make it a trigger_hurt entity. Give it the same name as the env_beam entities. Set the damage to any value you want- if you set it too low, a player can gaussjump right through the field, so i suggest 34875346593874 or so!
If you had set the damage/second of the env_beam to anything but 0, you would have got unpredictable results when the player came near the beam. With luck, a player might have escaped the beams entirely. With this, his chances of doing so are very low.

Finally- this is important- create two brushes, with the aaatrigger texture, such that each of them sticks out a little to one side over the trigger_hurt brush. Convert each of them to a trigger_push entity so that when a player walks into the field from one direction he gets pushed back in the direction he came from. Set the direction of push by putting the angle compass (The clock-like thingy) to the direction of push in the "2D top" view. Give them both the name of the env_beam entities.
And dont forget to add a button. In the target field put the common name of all the entities which you gave the same name(the env_beams, trigger_push, trigger_hurt).

And there you have a working, toggle-able force field:
