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

Members Online

»
0 Active | 95 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Scripted Breakable Windows
Versions: You must be logged in to view history.

In this tutorial we will be adding breakable windows to a building in our test map. Call of Duty does not support the basic Quaked func_window feature so we will need to do some trigger and scripting work just to get our windows to break.

I first want to thank n00bCODmapper & natestah of IWNation for laying the groundwork on this concept.

In this tutorial we will be adding breakable windows to a building in our test map. Call of Duty does not support the basic Quaked func_window feature so we will need to do some trigger and scripting work just to get our windows to break.

So we have a little test map with a building that we want to add some breakable windows to.

Let’s go to our first window and copy that brush. The window texture that I used, by the way, is in Austria > windows.

This new brush we are going to make our broken window with a broken window texture and the one we copied from will be our unbroken window with the unbroken window texture. Again both of these textures can be found in Austria > windows.

Then we are going to create another brush which will be our trigger brush. I am going to make mine thick enough so that I can break the window from the front or the back. We will texture this brush with the trigger texture in common > trigger.

Now we are done creating brushes and we are ready to set them up. First let’s set the trigger brush. Select the trigger brush and right click in a 2D view. In the menu, select trigger > damage.

Next we need to set a key pair for the trigger brush so that it will know what to do based off of the script we will talk about later. With the trigger brush still selected hit N to bring up the Entity Editor. We want to type in a key of targetname and a value of window. Then hit enter and your pair should now be listed under the classname pair.

That completes the trigger brush and we are going to setup our unbroken and broken window brushes next. Select the unbroken window and right click in the 2D view. Select script > brushmodel from the menu. Follow the same process for the broken window brush.

Now we have a trigger brush and two window brushmodel brushes.

Then we will setup each brush to target the other. We will start with the trigger and unbroken window brushes. Highlight the trigger brush first and then the unbroken window brush and then hit Ctrl + K (W).
Note that the order in which you select the brushes is very important.
You should now see a line and arrow connecting from the trigger to the unbroken window brush. We want to follow this same process for the unbroken window brush to the broken window brush.

Once completed, we have the trigger targeting the unbroken window brush and the unbroken window brush targeting the broken window brush.

The last thing to setup is where we want the glass breaking FX to appear when we break the window (For this tutorial map I picked the center of the window). For this we will setup a key pair on our unbroken window brush. In order to do this we need to get an X, Y, and Z location. Move your mouse in the 2D view over where you would like this effect to take place. We are going to start with the XY Top view to get our X and Y location. Note the X and Y location as we will need it later.

Then we will go to our XZ Front view and get our Z location. Note the Z location as we will need it later.

Next we will select the unbroken window brush if you haven’t done so already and hit N to bring up the Entity Editor again. We want to add a key of origin and a value of the locations we just recorded. In our case it was -344 -130 96. Again after we input our value location and hit enter the key pair will appear in the key pair window with the other key pairs.

Last we want to move the broken window brush and trigger brush to the unbroken window brush location.

For my other windows I have copied and pasted the three brushes to the other locations where I want breakable windows.
Note: Don’t forget to update the origin key with new values for each window that you copy and paste. Don’t worry about having to setup all that we did for the first three. The CoD Radiant will keep track of the different triggers.

That completes all our map work. At this point you can compile your map. All we have left is to make a script for our trigger. This part has already been done by n00bCODmapper that we mentioned earlier. Download his script from this link HERE and rename it to your maps name. Our test map was named breakwindow so it’s currently named breakwindow.gsc. He has done an excellent job of describing what each part of his script does. Make sure your .gsc and .bsp are in the same folder for testing. Note that if you already have a script for your map you will simply want to implement his script into yours.

I have made a short video of how this will work in game. It’s a good bit of work to have breakable windows but the effect it has on a map is quite nice. Get the video HERE

You can download a copy of the .map HERE and .bsp HERE. Again dont forget to get the .gsc HERE.

Written by General Death

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

»