Legacy:Making Glass Break

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search

Exploding Glass... What?

You can simulate real exploding glass in UnrealEd very easily. I will explain this step by step. It is a lot like exploding walls.

Note: The BreakingGlass actor used in this guide is only available in UT. Starting with UT2003 Emitters can be used instead to create far better glass breaking effects. See the Breaking Glass UT2003 for that.

Show Me!

  1. Find a place you want your glass to go. (Hopefully a windowframe)
  1. Create a mover that is 2 units thick and 2 units thinner than your area you wish to put it in. Set its key 1 to outside the level and key 0 in its normal position.
    The minus 2 units of glass is used to avoid BSP holes when you can see through the edges of the glass. (A lot of mappers forget this and it shows up)
  1. Texture the mover with something glassish. There is good textures in the Coret package. Make sure you set it to translucent in the Surface Flags (UT).
  1. Add an Actor >> Effects >> ExplodingWall >> BreakingGlass in the middle of your glass mover. For "respawning" glass you should use the custom RetriggerableBreakingGlass actor instead.
  1. Set the mover's event to match the BreakingGlass actor's tag, e.g. 'glass'.
  1. Set the following properties of the mover:
    • Mover -> bDamageTriggered = True
    • Mover -> bTriggerOnlyOnce = True (False for respawning glass)
    • Mover -> DamageThreshold = 1
    • Mover -> MoveTime = 0
    • Object -> InitialState = TriggerToggle (for one-shot breaking)
      Object -> InitialState = TriggerOpenedTime (for respawning glass)
    • Mover -> StayOpenTime = 30-60 (only for respawning glass, number of seconds to wait after breaking)
  1. Set the following properties of the BreakingGlass actor:
    • Collision-> bCollideActors = False (this makes sure projectiles really hit the glass mover, not the BreakingGlass actor)
    • Effects -> bOnlyTriggerable = True
    • ExplodingWall -> bTranslucentGlass = True

Alright so you're done now. When you shoot the glass mover with anything that does over 1 damage (basically everything) then it will instantly move out of the level and trigger the actor to display glass shattering and making noise.

Potential Problems

Exploding projectiles not only break the window they hit, but also others nearby 
Make sure the glass mover's pivot point is right in its center. Also, if you failed to disable the BreakingGlass actor's collision, the projectile's explosion center might be far enough out from the wall to "see" other glass movers as well.
For "respawning" glass the breaking effect only plays once 
Use the custom RetriggerableBreakingGlass class instead of BreakingGlass.