[page=First Step]
Create two brushes, as shown.
Next, use the "clip tool" on one of the brushes, and get an angle similar to what I have. To make it only cut, and not delete, click the tool more then once, till the whole box is white, like shown. Hit enter when you like the angle.
Now do the same for the other wall, make sure the edges meet at the bottom.
Next select both your newly created clips, as shown, and hit "ctrl+t" to tie them to an entity. Make them a func_breakable.
In the first tab, make the value for "prop data" stone medium. Then make "material type" cinder block. Give it the name "wall" (without quotes) Go the the "flags" tab and make sure the only thing checked is "only break on trigger" then Hit apply.
Next we need to make a button for the trigger. Create a prop_dynamic, and give it the keypad model. (its in props_lab) Place it away from the wall, but facing it so you can see the wall when you push it. Create a small brush directly in front of it, and tie it to entity func_button. Under "flags" make sure "don't move" is checked. The rest of the default settings will be fine.
Now lets create the explosions. On the inside corner of your walls, place an env_explosion entity. Name it "explosion" In the flags tab, check "no damage" and "no sound"
Next are the sounds. Create a ambient_generic somewhere inside the map. I am doing it near the button so its easy to find. Name thi,s "explosion_sound" Now choose the sound. Click on "sound name" then browse. In the filter type HeadcrabCanister.Explosion. You can preview the sound. Hit OK then apply. Also make sure the "play everywhere" flag is enabled. Create another ambient generic just like this one, but call it "incoming" and give it the sound HeadcrabCanister.IncomingSound. Now we are ready to link all our entities.
Select the button and click on the "outputs" tab. Click on "add". On the first line,"my output named" click the down arrow and a list of your options will appear. Make it "OnPressed" the next line, "target entities named" , click the down arrow, and you should see a list of the 4 entities you can trigger. Select explosion. On the third line "via this input" select "explode". This will link the button with the explosion, so when pressed, the explosion will happen. Give it a delay of .5 seconds, and select "fire once" as shown in picture.
Next we will tie the explosion sound to the button. Click add again. Set the output named to onpressed again, select the target entity "explosion_sound" and set the input to "playsound" (you will have to scroll down for it). Give it a dely of .5 seconds and fire once.
same as before,add, then onpressed, then the entity named "incoming", via "playsound." For this one, do not delay the sound, but check fire once.
Same as before, add, then "onpressed", the entity named "wall", via input "break" Delay .5 seconds, fire once. You should now have 4 outputs tied to this entity.
Prepare Level. Add a floor, walls, and apply a skybox to the ceiling, as shown.
Lighting - Add a light_environment to the map, close to the top of the skybox. Make the pitch -45. Now add a spawn point, info_player_start. Thats it. Compile and run. Push the button, watch the destruction.
The result:
Spruce it up. Make the destruction more random looking, texture the breaks in the walls with broken concrete, add rebar that will stick out when its blown up, have fun with it. I did this real fast, just for fun. Put a bunch of combine on top of the building then blew it up.
clear n simple, gj!
Nice tutorial A+.
nice tutorial
Fo whatever reason, my wall doesn't collapse with the explosion.
The button is set to trigger the explosion to go off like you stated above, but the wall just sits there.
Is it possible that the wall is too big?
Any ideas?!?!?!
Re-read the 4th function for the button trigger. It needs to be set to "break" the broken part of the wall at the same time the explosion is triggered, the explosion itself won't break the wall as we set the wall to break on trigger only, and like I said before, the trigger is the button not the explosion.
I could spend days filling up rooms and blowing people up like that, thanks!
Excellent tutorial, really helpful.
PS: Great idea with blowing up the combine, it is really funny and cool!
Awesome Nice and clear been looking for help with da clip tool to .
does it have to be triggered by a button instead of just shooting it with a rocket or other weapon, that would seem more useful
nicely done.