Using "env_shake" Properly Difficulty: Intermediate |
| Category: CS:S > Mapping | Author(s): Grey-Echo |

USING ENV_SHAKE PROPERLY
This tutorial will explain how to use the entity “env_shake” correctly and efficiently without any bugs or errors, and it’s totally customizable. What it does is create an earthquake-like occurrence, where the player feels as if there’s a rumbling all around them. Their screen shakes, and therefore it’s very useful if you’re making a scenario with rocks or the like.
Follow the procedure step by step and refer to the screenshot references when they’re available to you, especially if you’re having difficulty understanding anything I’m saying at any point during the tutorial. If you continue to have difficulty however, I suggest you learn a bit more about mapping and come back to this at a later date, otherwise you’ll struggle through the entire thing, especially if you don’t understand the first couple of steps. This is an Intermediate-skill tutorial.
1) Launch Hammer, and make a new map. I suggest saving it right away and naming it something obvious, like “shake_tutorial”, so that you may easily refer back to it for later use in your maps. Make sure you save often, just in case Hammer crashes, which can happen often even while in the process of doing the most simplest of actions.
2) Make a hollow box with some Counter-Terrorist and Terrorist spawn points in it. Obviously, make sure the room is sealed and there aren’t any leaks. You don’t need to add lights if you don’t want to as full-bright will be fine in this case. If you don’t know how to do this, then I recommend you do not continue with the tutorial. You should have a basic knowledge of how to create a simple room by now. If not, read up how to do so and practice, then come back to this project when you fully understand what you’re doing. [Screenshot 1]
3) How that you have your basic room ready to go, go to the entity tool and navigate through the drop-down list to find an independent entity called “env_shake”. Add it to your room. There are several things you’ll notice right off the bat: you can adjust the radius of the shaking, and that it’s treated like any other independent entity. While you don’t necessarily need it in your room, it’s best to do so as it’ll be a lot easier refer to if you need to change any of its properties. Now, adjust the radius of env_shake to your liking. [Screenshot 2]
4) Great, so you’ve got your entity on the map. Now, let’s adjust some of its properties. Right-click on it, and click Properties. What we’re most interested in on the list that appears are the following: Name, Amplitude (0-16), Duration (seconds), and Frequency. For testing purposes, I recommend using the following values for each, but later on feel free to adjust these settings to your liking:
Name: shake
Amplitude (0-16): 10
Duration (seconds): 5
Frequency: 50
These settings will allow us to clearly see what env_shake can do, while not making your head explode with confusion. [Screenshot 3]
5) Now that we’ve got the properties down, let’s go to the Flags tab. You should see the following options available to you upon doing this. I’ve included descriptions of each for your convenience.
GlobalStrike – Radius is void. Shaking occurs throughout the entire map.
In Air – Even objects in air are affected by the shaking.
Physics – Shakes physical objects to create a realistic feel, but in turn can mess with some of your non-static props and make them move around.
Ropes – Also shakes ropes.
DON’T shake view (for shaking ropes and physics only) – Doesn’t shake the player’s view. Make sure that if you’re using this, you also select Physics and/or Ropes, as otherwise having this entity is pointless.
Fool around with these settings as you like, but I recommend leaving everything as default for now (with all boxes unchecked) so you can test these things yourself later. [Screenshot 4]
6) Now it’s time to really have some fun. So far we’ve told the entity what to do and what to do it to, but we are yet to tell it when to do it. To do this, we’ll need help from another entity, so go to your entity tool list again and find “logic_timer”. Proceed to add it to your map and open up its properties like before with env_shake. You should see the following when you do this, as well as my suggested default settings which will allow you to see real results. [Screenshot 5]
Name: shaketimer
Start Disabled: No
Use Random Time: Yes
Minimum Random Interval: 1
Maximum Random Interval: 30
Refire Interval: 10
7) After you’ve got your timer ready, it’s time to connect the two. Go to the Output tab and match the information in my screenshot to what you’re doing in Hammer. After this, your timer will be ready to go and you can get ready to test the map. Just make sure that if you didn’t use the same names I suggested for env_shake and logic_timer, you’ll need to replace the names where necessary. Also, you can change the frequency delay to whatever you want, but I’m suggesting 5 seconds, as our env_shake already has a frequency delay set. The same goes with the “Fire once only” checkbox, which you can choose to check or not later depending on your needs. You should know all of this if you’ve gotten this far in the tutorial. [Screenshot 6]
Well, I've ran out of screenshot space, so save your map, compile it, and enjoy. Sorry for making this thing so long, but it should help you for future tutorials as well, especially those involving logic_timer. Enjoy. =) |
| Added: 1 year ago | Tags: mapping, maps, map, entity, shake, earthquake, rumble |
 Add Feedback Provide constructive feedback. What is "constructive"?You cannot post yet!Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop. To post in this submission register or login. |
 You cannot assess yet!Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure. To vote on this submission register or login. This Tutorial in a nutshell... No stamps recordedYou cannot stamp yet!Stamps let you apply characteristics to submissions to help others understand them. To stamp this submission register or login. .http://www.ke0.us/ Ranked 673rd ( 2) with 3,164 points. 11 points behind .[+] DonateWant more? Find related tuts. |