Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 165 Guests
Online:

LATEST FORUM THREADS

»
Mohaa maps on Cod2?
CoD2 MP Mapping
is this place alive?
CoDBO3 Mapping
Call of Dutyģ: WWII
CoD WW2 General

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Using Exploders
Versions: You must be logged in to view history.
This tutorial will take you through the use of exploders, exploderchunks and fx from start to finish.  For those wondering, an exploder is what is described in the breakable windows without scripting tutorial.  Lots of pictures...56K beware

The Use of Exploders

Tutorial by StrYdeR


This tutorial will take you through the use of exploders, exploderchunks and fx from start to finish.  For those wondering, an exploder is what is described in the breakable windows without scripting tutorial.  This tutorial will hopefully clarify some instructions, as well as show you how to use the clipper and create doors, windows and general destruction WITHOUT using CSG function.  I will cover using exploders to destroy a window as well as a wall....so...without further ado...lets get mapping.


Destroyable Wall (part 1)


As a good mapping technique (that I am hoping gets passed on to all new mappers, and converts stubborn experienced mappers) I start by loading the common textures and selecting caulk.  You will notice that I construct ALL geometry from primitive (common) textures first and then paint (texture) only the visible surfaces after

So, with textures --> common --> caulk selected we draw out our wall.

exploder1.jpg

You may notice that I have dropped an actor in to get a height reference for what I am trying to accomplish, and this isn't really a neccessity, though it tends to aid in making your map the way you want the finished product to appear.

Click on the clipper button on the toolbar (it is the 16th button from the left), and we are going to create the hole in our wall.  First we need to define where the edges of the destruction are going to be, so we clip one side. 

exploder2.jpg

Now, you may be wondering what was the point of clipping?  3/4s of the wall just disappeared when I clipped it?  Well, after clipping the next thing you want to do is press shift+enter and you should then be looking at something like this.

exploder3.jpg

Clip the other side of the potentially damaged area (we are going to make the center part of the wall destroyable).  You should now be looking at something like this.

exploder4.jpg

Press esc a couple of times to de-select everything, then shift+click to select the center portion of the wall.  Notice that we didnt select the outside portions (these are going to remain unchanged) of the wall.  Use the clipper tool to chop some damage into the wall, using the technique as described above.  When done you should have something that may llok like this.

exploder5.jpg

Press esc a couple of times to de-select everything, then use shift+click to select the outside portions of your wall.  Press "H" or click selection --> show/hide --> hide selected to hide the pieces that are not going to get worked on.  This isn't a neccessity, though it will make things easier to follow.

exploder6.jpg

Now, out of all that clipping we did, we need to select the pieces that are going to represent what the wall is going to look like AFTER it explodes.  Shift+click to select the pieces that are going to be remaining after the wall explodes.

exploder7.jpg

Right click in the 2d grid and select script --> brushmodel.

exploder8.jpg

With the pieces still selected, press "N" to bring down the entity editor.

exploder9.jpg 

Enter the following key/value pairs:

targetname/exploder

script_exploder/10

The number value for script_exploder can be any value that you choose that is greater than 5 (the first 5 are reserved for different gametype objectives), but keep in mind, that each different application of exploders will require its own number.  For instance, all of the components of our wall are going to have the script_exploder value of 10, we can therefor NOT use the value 10 for any other exploder in this map (the next one will be 11, then 12 and so on.....).  Confused?  Read on and hopefully it will become clearer as the tutorial progresses.


Exploderchunks (eye candy)


This section is going to teach you how to implement exploderchunks.  This is not required for your exploders to work, and if you do not want to implement them - simply delete the remaining clipped brushes in your wall and resume at Destroyable Wall (part 2).  The reason that it is in this portion of the tutorial is that it is the next step if they are to be implemented in the map.

OK, as you are still reading, I am going to assume that you want to add a little eye candy to your map...and who doesn't?  So first let's hide (press "H") the pieces that we made that represent the "AFTER" wall (what we did in the previous step)

The trick to implementing exploderchunks (and the most common mistake made causing them not to work) is that they have to be created individually.

exploder10.jpg

Shift+click to select one of the remaining clipped pieces of the wall.  Right click in the 2d grid and select script ---> brushmodel.  Press "N" to bring down the entity editor and enter the following key/value pairs:

targetname/exploderchunk

script_exploder/10

*Notice how the value for script_exploder is the same, as we are still talking about the wall

Press esc a couple of times to deselect everything, then right click in the 2d grid.  Select script --> origin.

exploder11.jpg

This script_origin is going to represent the direction that the exploderchunk is going to travel in, so position it so.  Press esc to deselect everything, then shift+click the script_brushmodel then the script_origin (the order is very important).  Press ctrl+k on your keyboard and the two entities will be linked.  If you have paths shown (view --> show --> paths) you will notice that the arrow on the line is pointing from the brushmodel towards the origin (shown below)

exploder12.jpg

Select (shift+click) the origin and the brushmodel and press "H" to hide them, then repeat this process with each brush you want to be an exploderchunk.  You don't have to make them all exploderchunks, but I did.  This is what it will look like after pressing shift+H to unhide everything.

exploder13.jpg


Destroyable Wall (part 2)


OK, welcome back for those who decided to skip the exploderchunks section.  We need to start by hiding everything that is NOT part of the untouched wall (everything that is not part of the damage boundaries).  The easiest way is going to be to draw a brush that completely encloses all the modified brushes that we created and clicking the select inside toolbar button (12th button from the left).  Once all the brushes and entities are selected press "H" to hide them.

exploder14.jpg

With textures --> common --> caulk we are going to draw out what this section of wall is going to look like BEFORE it gets destroyed.  Drag out a brush that represents this definition and right+click in the 2d grid and select script --> brushmodel.

exploder15.jpg

Press "N" to bring down the entity editor, and enter the following key/value pair:

script_exploder/10

exploder16.jpg

*Notice how the value for script_exploder is still 10, as we are still talking about the wall.

Hide that brush (press "H"), and load  textures --> common --> shadow cast.  Generally, scripted objects don't cast a shadow, and a script_brushmodel is no exception, so we will take care of that now.  It is as simple as drawing a brush to fill the scripted area (in this case the center portion of the wall) with the shadow cast primitive.

exploder16a.jpg

Now, we need to make this whole thing come together.

Load the trigger primitive (textures --> common --> trigger) and draw out the trigger area.  It is usually a good idea to make the trigger a little bigger in all directions than the brush it will affect.

exploder17.jpg

Right click in the 2d grid and select trigger --> damage.

exploder18.jpg

Press "N" to bring down the entity editor and enter the following key/value pair

script_exploder/10

*Notice that the value for script_exploder is still 10, as we are STILL talking about the wall

You will also notice that there are several boxes that you can check in the entity editor.  These create spawnflags, and I have set my spawnflags so that rifles, pistols and a melee attack will not trigger the trigger.

exploder19.jpg

Now that the geometry is done we can go and texture the visible faces, and the faces that will be visible when the wall explodes...textured it will look something like this

exploder20.jpg

You will need to add this line to the main section of yourmapname.gsc (if it isn't there already)

mapsmp_load::main();


Destroyable Windows


For this example, I have already clipped the window openings into a caulk wall and textured the visible faces

exp1.jpg

I have set the grid to scale 2, which is half the thickness of my walls, and portrays the windows more realistically (I haven't seen any window that is as thick as a wall yet).

Using textures --> common --> caulk I draw out a brush for the window.

exp2.jpg

Then using the clipper tool we clip the window to create a damaged look.

exp5.jpg

Leaving everything selected, we shift+click the clipped section to de-select the pieces that are going to represent our broken window.

exp6.jpg

Then press the backspace key to delete the remaining pieces.

Shift+click to re-select the pieces that you chose to represent your broken window.

exp7.jpg

Right click in the 2d grid and select script --> brushmodel.

exp8.jpg

Press "N" to bring down the entity editor and enter the following key/value pairs:

targetname/exploder

script_exploder/11

*Notice that the value for script_exploder has changed to 11 since we are now referring to a different scripted event in our map

exp9.jpg

Now let's draw out the unbroken window brush.  Press esc a couple of times to de-select everything.  Using textures --> common --> caulk draw out the unbroken window brush.  Right click in the 2d grid and select script --> brushmodel.  Press "N" to bring down the entity editor and enter the following key/value pair:

script_exploder/11

exp11.jpg

*Notice that we are still talking about the window so our value for script_exploder is still 11

Now our geometry is done, so lets give this some texture.  For my windows I chose austria/windows/shop_window, but look what happens when i throw that texture on.

exp12.jpg

That isn't quite what I had in mind, so I press "S" to bring down the surface inspector and modify the size and position to suit my needs.  I also make a note of these values, as I will need to apply them to the broken window.

exp14.jpg

Now, having my window looking more like I envisioned it I hide the unbroken version of the window so I can texture the broken version.  Using shift+click I select all of the broken window brushes and apply my austria/windows/shop_window texture.  Then, we press "S" to bring down the surface inspector and match the values that we gave the unbroken window.

exp15.jpg

Press esc a couple of times to de-select everything.  Then using the textures --> common --> trigger primitive, draw out the trigger area.  As stated before, it is a good idea to create your trigger area slightly larger in all dimensions than the area it affects.  Right click in the 2d grid and select trigger --> damage.  Then press "N" to bring down the entity editor and enter the following key/value pair:

script_exploder/11

exp17.jpg

*Notice, we are still talking about this window (or scripted event) so the number for script_exploder is still 11

There are spawn flags available, as with any entity, but I am choosing to allow anything to break my windows (you can check any of them that you want)

You will need to add this line to the main section of yourmapname.gsc (if it isn't there already)

mapsmp_load::main();


Exploder fx (more eye candy)


Right click in the 2d grid (with nothing selected) and select script --> model.  2 windows will open the file browser and the entity editor.  In the case of adding an effect, it is quicker to type in the values than to hunt for the fx model, so simply close the file browser.

In the entity editor enter the following key/value pairs:

script_exploder/11

model/xmodel/fx

script_fxid/breakglass

exp20.jpg

*Notice that the value for script_exploder is still 11 as we are still referring to the same scripted event

*Note - the script_fxid can be anything you choose, but you have to define it in yourmapname.gsc

The position of the fx xmodel will determine the starting origin of the effect, so we need to define the direction that the effect will go off in.

Right click in the 2d window and select script --> origin.  Position it in the map so that it represents the direction that the effect will go off towards.

Press esc a couple of times to de-select everything then shift+click to select first the fxmodel then the script_origin (the order is very important).  Press ctrl+k to link the 2 entities.  You will notice that the directional arrow on the link line points from the xmodel towards the script_origin.

exp22.jpg

In yourmapname_fx.gsc, you will need to define your script_fxid alias.  You can take a look at the map file for this tutorial, as well as all of the files that go with it here

Hope this helps

StrYdeR

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»