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

Members Online

»
0 Active | 47 Guests
Online:

LATEST FORUM THREADS

»
Include MP weapons in SP
CoDWW SP Mapping

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Breakable Windows With No Scripting
Versions: You must be logged in to view history.
How to make breakable windows in your map without scripting

Tutorial by t-bag

1. Start by making the broken window first:
-make the broken window out of brushes. This will be how you want it to look after it is shot out.
-select all of them. With them highlighted right click and from the drop down menu select script and then brushmodel.
-Once that is done hit n to bring up the entities window.
-enter a key: script_exploder and value: 10.
(The value that you choose can be any number except 1 or 2, because you usually assign 1 or 2 to your S&D objectives.)
-Enter a key: targetname and a value: exploder
2. Now make the unbroken window:
-make the unbroken window out of brushes. This will be how you want it to look before it is shot out.
-select the unbroken window brush. With it highlighted right click and from the drop down menu select script and then brushmodel.
-Once that is done hit n to bring up the entities window.
-enter a key: script_exploder and value: 10.
(you enter the same value as you did for the broken window.)
3. Now make the damage trigger:
-make a brush with the common/trigger texture. The brush should cover the window and overlap a bit so that when something hits the trigger brush it will tell the game engine to break the window.
-select the trigger brush. With it highlighted right click. From the dropdown menu select trigger and then damage.
-Once that is done hit n to bring up the entities window.
-enter a key: script_exploder and value: 10.

There are a bunch of little boxes you can check. For instance if you check no_pistol it will tell the game engine that the window can't be broken by pistol.

You can stop there if you want to. It will work as is right now. It just won't have any breaking glass effects.

4. To add breakable glass effects just right click near the breakable window.
-from the dropdown menu select script and then model.
-a window will pop up in the background for you to choose the model. Select fx. Now bring up the entities window if it isn't already up. For the model key, just make sure that the value says only xmodel/fx
-enter a key: script_exploder and value: 10.
-enter a key: script_fxid and a value glassbreak
(the value can be whatever alias you choose to assign, you will just have to make sure that you list that alias in your fx.gsc file.)

5. now you have to make an origin for the effect.
- Right click somewhere near the effect. From the menu select script and then origin.
-deselect the origin model.
-now select the fx model, then select the origin. (the order is important)
-press control k to connect them.
-you can drag the origin around to change the angle that the effect goes off to.

6. (optional) add a trigger to tell the player that the window can be broken.
-make a brush in the trigger texture and place it where you want the player to be alerted.
-right click and select trigger and then use.
-hit n to bring up entities and enter a key:hintstring and a value: Whatever message you want it to display.

Alternatively you can use another effect (like whistling wind or whatever) to tell the player that something is different about that particular window.

7. If you used and effect you need to make a yourmapname_fx.gsc file that you will put in the pk3 under the maps/mp folder along with your bsp file. Here is a sample:

main()
{
precacheFX();
}

precacheFX()
{

level._effect["glassbreak"] = loadfx ("fx/impacts/glass_shatter.efx");

}

8. Add a line to your gsc file to tell it to load the fx file:

mapsmpyourmapname_fx::main();

And that should do it!
You can modify this tutorial to make breakable boxes (with weapons or health inside or that cover up tunnel entrances) , walls that fall down if they a grenade goes off by it, sewer grates that have to be blown up with grenades, anything you can think of. You would just change the effect to an appropriate effect for what you are trying to do. Hope this is helpful. You can see a demonstration of breakble windows, grates and objects in my new map Arkov.
Thanks to t-bag for this tutorial.

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

»