Glass that starts out broken: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
I couldn't seem to find a tutorial about how to make a glass window start out broken, so I decided that I'd write one. Just so you know, this is my first tutorial.
I couldn't seem to find a tutorial about how to make a glass window start out broken, so I decided that I'd write one. Just so you know, this is my first tutorial.


I assume you already now how to make a proper breakable window. If you do not know, there is a good tutorial about it here at [[[http://developer.valvesoftware.com/wiki/Creating_Breakable_Glass]]].
I assume you already now how to make a proper breakable window. If you do not know, there is a good tutorial about it here at [http://developer.valvesoftware.com/wiki/Creating_Breakable_Glass Creating Breakable Glass here at the Source Wiki].


'''Step 1:''' Open one of your maps or make a new one.
'''Step 1:''' Open one of your maps or make a new one.
Line 9: Line 9:
'''Step 3:''' Set up an env_explosion in the middle of the window, then change the options of the env_explosions as follows:  
'''Step 3:''' Set up an env_explosion in the middle of the window, then change the options of the env_explosions as follows:  


''Name: Anything you want as long as you know what it is''
:''Name: Anything you want as long as you know what it is''
:''Magnitude: 1''


''Magnitude: 1''
:Then in the flags tab, change the flags as follows: Check No fireball, No smoke, No decal, No sparks, No sound, No fireball smoke, No particles, and No Dlights.
 
Then in the flags tab, change the flags as follows: Check No fireball, No smoke, No decal, No sparks, No sound, No fireball smoke, No particles, and No Dlights.


'''Step 4:''' Set up a logic_auto near the env_explosion (it doesn't matter where you put it, but I recommend that you put it in a convenient place)
'''Step 4:''' Set up a logic_auto near the env_explosion (it doesn't matter where you put it, but I recommend that you put it in a convenient place)
Line 19: Line 18:
'''Step 5:''' Change the entity outputs for the logic_auto as follows (if you aren't sure how to use the input/output system, read this):  
'''Step 5:''' Change the entity outputs for the logic_auto as follows (if you aren't sure how to use the input/output system, read this):  


''My output named: OnMapSpawn''
:''My output named: OnMapSpawn''
 
:''Target entities named: env_explosion (the name you typed for that entity)''
''Target entities named: env_explosion (the name you typed for that entity)''
:''Via this output: Explode''
 
:''Check the box that says, "Fire once only".''
''Via this output: Explode''
 
''Check the box that says, "Fire once only".''


Then in the flags tab, change the flags as follows: Check "Remove on fire"
:Then in the flags tab, change the flags as follows: Check "Remove on fire"


'''Step 6:''' Test your map! When it loads the env_explosion will break the glass leaving the jagged glass edges on the side of the frame.
'''Step 6:''' Test your map! When it loads the env_explosion will break the glass leaving the jagged glass edges on the side of the frame.

Revision as of 21:08, 7 September 2005

I couldn't seem to find a tutorial about how to make a glass window start out broken, so I decided that I'd write one. Just so you know, this is my first tutorial.

I assume you already now how to make a proper breakable window. If you do not know, there is a good tutorial about it here at Creating Breakable Glass here at the Source Wiki.

Step 1: Open one of your maps or make a new one.

Step 2: Make a func_breakable_surf with a frame around it (as if you are making a normal breakable window).

Step 3: Set up an env_explosion in the middle of the window, then change the options of the env_explosions as follows:

Name: Anything you want as long as you know what it is
Magnitude: 1
Then in the flags tab, change the flags as follows: Check No fireball, No smoke, No decal, No sparks, No sound, No fireball smoke, No particles, and No Dlights.

Step 4: Set up a logic_auto near the env_explosion (it doesn't matter where you put it, but I recommend that you put it in a convenient place)

Step 5: Change the entity outputs for the logic_auto as follows (if you aren't sure how to use the input/output system, read this):

My output named: OnMapSpawn
Target entities named: env_explosion (the name you typed for that entity)
Via this output: Explode
Check the box that says, "Fire once only".
Then in the flags tab, change the flags as follows: Check "Remove on fire"

Step 6: Test your map! When it loads the env_explosion will break the glass leaving the jagged glass edges on the side of the frame.