Glass that starts out broken: Difference between revisions
Jump to navigation
Jump to search
m (Fixed link.) |
m (tidy & recategorized) |
||
Line 1: | Line 1: | ||
This tutorial assumes you already know how to [[Breakable Glass|create breakable glass]], | [[Image:Brokenglasstutorial0000.jpg|thumb|200px|right|Broken glass that breaks when the map starts]] | ||
This tutorial assumes you already know how to [[Breakable Glass|create breakable glass]]. If not, follow that tutorial first. | |||
*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 as follows: | |||
== First method == | |||
This method consists on breaking the glass with the help of an explosion that occurs once the map is loaded. | |||
* 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 as follows: | |||
{{entity-kvalue-start|[[env_explosion]]}} | {{entity-kvalue-start|[[env_explosion]]}} | ||
{{entity-kvalue|Name|<name>|<name> is whatever name you wish to give to this entity}} | {{entity-kvalue|Name|<name>|<name> is whatever name you wish to give to this entity}} | ||
{{entity-kvalue|Magnitude|1|}} | {{entity-kvalue|Magnitude|1|}} | ||
{{entity-kvalue-end}} | {{entity-kvalue-end}} | ||
*Then in the flags tab, change the flags as follows: | * Then in the flags tab, change the flags as follows: | ||
{{entity-flag-start}} | {{entity-flag-start}} | ||
{{entity-flag|No fireball|on|}} | {{entity-flag|No fireball|on|}} | ||
Line 18: | Line 25: | ||
{{entity-flag|No Dlights|on|}} | {{entity-flag|No Dlights|on|}} | ||
{{entity-flag-end}} | {{entity-flag-end}} | ||
*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: | * Change the entity outputs for the logic_auto as follows: | ||
{{entity-output-start}} | {{entity-output-start}} | ||
{{entity-output||OnMapSpawn|<name>|Explode|||Yes|<name> is the name you gave the entity in the third step above}} | {{entity-output||OnMapSpawn|<name>|Explode|||Yes|<name> is the name you gave the entity in the third step above}} | ||
{{entity-output-end}} | {{entity-output-end}} | ||
*Then in the flags tab, change the flags as follows: | * Then in the flags tab, change the flags as follows: | ||
{{entity-flag-start}} | {{entity-flag-start}} | ||
{{entity-flag|Remove on fire|on|}} | {{entity-flag|Remove on fire|on|}} | ||
{{entity-flag-end}} | {{entity-flag-end}} | ||
*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. | ||
== Alternative method == | |||
This method consists on setting the logic_auto entity to directly shatter the glass once the map is loaded, which eliminates the need of creating an explosion. | |||
*Name the func_breakable_surf you created in step 2 above. | * Name the func_breakable_surf you created in step 2 above. | ||
*Don't create the env_explosion entity in step 3 above. | * Don't create the env_explosion entity in step 3 above. | ||
*Do create the logic_auto entity in step 5 above. | * Do create the logic_auto entity in step 5 above. | ||
*Change the entity outputs for the logic_auto as follows: | * Change the entity outputs for the logic_auto as follows: | ||
{{entity-output-start}} | {{entity-output-start}} | ||
{{entity-output||OnMapSpawn|<name>|Shatter|0.5 0.5 128||Yes|<name> is the name you gave the func_breakable_surf entity}} | {{entity-output||OnMapSpawn|<name>|Shatter|0.5 0.5 128||Yes|<name> is the name you gave the func_breakable_surf entity}} | ||
{{entity-output-end}} | {{entity-output-end}} | ||
*Adjust the parameter above as desired. Changing the size of the third number (128) will change how much of the window is broken. | * Adjust the parameter above as desired. Changing the size of the third number (128) will change how much of the window is broken. | ||
[[Category:Level Design | [[Category:Level Design Tutorials]] |
Revision as of 07:00, 6 February 2008
This tutorial assumes you already know how to create breakable glass. If not, follow that tutorial first.
First method
This method consists on breaking the glass with the help of an explosion that occurs once the map is loaded.
- 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 as follows:
Class: env_explosion | ||
Keyvalues | Comments | |
Name | <name> | <name> is whatever name you wish to give to this entity |
Magnitude | 1 | |
- Then in the flags tab, change the flags as follows:
Flag | ||||
![]() |
No fireball | |||
![]() |
No smoke | |||
![]() |
No decal | |||
![]() |
No sparks | |||
![]() |
No sound | |||
![]() |
No fireball smoke | |||
![]() |
No particles | |||
![]() |
No Dlights | |||
- 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:
My output | Target entity | Target input | Parameter | Delay | Only once | Comments | ||
![]() |
OnMapSpawn | <name> | Explode | Yes | <name> is the name you gave the entity in the third step above | |||
- Then in the flags tab, change the flags as follows:
Flag | ||||
![]() |
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.
Alternative method
This method consists on setting the logic_auto entity to directly shatter the glass once the map is loaded, which eliminates the need of creating an explosion.
- Name the func_breakable_surf you created in step 2 above.
- Don't create the env_explosion entity in step 3 above.
- Do create the logic_auto entity in step 5 above.
- Change the entity outputs for the logic_auto as follows:
My output | Target entity | Target input | Parameter | Delay | Only once | Comments | ||
![]() |
OnMapSpawn | <name> | Shatter | 0.5 0.5 128 | Yes | <name> is the name you gave the func_breakable_surf entity | ||
- Adjust the parameter above as desired. Changing the size of the third number (128) will change how much of the window is broken.