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 4: Line 4:
#Open one of your maps or make a new one.
#Open one of your maps or make a new one.
#Make a [[func_breakable_surf]] with a frame around it (as if you are making a normal breakable window).
#Make a [[func_breakable_surf]] with a frame around it (as if you are making a normal breakable window).
#Set up an [[env_explosion]] in the middle of the window, then change the options of the env_explosions as follows:<br />''Name: Anything you want as long as you know what it is''<br />''Magnitude: 1''<br />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.[[Image:Brokenglasstutorial0000.jpg|thumb|300px|right|Broken glass that breaks when the map starts]]
#Set up an [[env_explosion]] in the middle of the window, then change the options of the env_explosions as follows:
{{entity-kvalue-start|env_explosion}}
{{entity-kvalue|Name||..anything you want as long as you know what it is}}
{{entity-kvalue|Magnitude|1|}}
{{entity-kvalue-end}}
#Then in the flags tab, change the flags as follows:  
{{entity-flag-start}}
{{entity-flag|No fireball|on|}}
{{entity-flag|No smoke|on|}}
{{entity-flag|No decal|on|}}
{{entity-flag|No sparks|on|}}
{{entity-flag|No sound|on|}}
{{entity-flag|No fireball smoke|on|}}
{{entity-flag|No particles|on|}}
{{entity-flag|No Dlights|on|}}
{{entity-flag-end}}
[[Image:Brokenglasstutorial0000.jpg|thumb|300px|right|Broken glass that breaks when the map starts]]
#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)
#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)
#Change the entity outputs for the logic_auto as follows (if you aren't sure how to use the input/output system, read this):<br />''My output named: OnMapSpawn''<br />''Target entities named: env_explosion (the name you typed for that entity)''<br />''Via this output: Explode''<br />''Check the box that says, "Fire once only".''<br />Then in the flags tab, change the flags as follows: Check "Remove on fire"
#Change the entity outputs for the logic_auto as follows (if you aren't sure how to use the input/output system, read this):<br />''My output named: OnMapSpawn''<br />''Target entities named: env_explosion (the name you typed for that entity)''<br />''Via this output: Explode''<br />''Check the box that says, "Fire once only".''<br />Then in the flags tab, change the flags as follows: Check "Remove on fire"
#Test your map! When it loads the env_explosion will break the glass leaving the jagged glass edges on the side of the frame.
#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 01:34, 13 March 2006


This tutorial assumes you already know how to create breakable glass, if not then follow that tutorial first.

  1. Open one of your maps or make a new one.
  2. Make a func_breakable_surf with a frame around it (as if you are making a normal breakable window).
  3. Set up an env_explosion in the middle of the window, then change the options of the env_explosions as follows:
Class: env_explosion
Keyvalues Comments
Name ..anything you want as long as you know what it is
Magnitude 1
  1. Then in the flags tab, change the flags as follows:
Flag
Checkbox-on.png No fireball
Checkbox-on.png No smoke
Checkbox-on.png No decal
Checkbox-on.png No sparks
Checkbox-on.png No sound
Checkbox-on.png No fireball smoke
Checkbox-on.png No particles
Checkbox-on.png No Dlights
Broken glass that breaks when the map starts
  1. 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)
  2. 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"
  3. Test your map! When it loads the env_explosion will break the glass leaving the jagged glass edges on the side of the frame.