Smashing windows
Email :EZkeel
Accompanied files : Window.UNR
This tutorial will help you create a window that
bars the players path until it is shot at, at which point the window will
appear to smash to pieces.
Tutorials you will need to have read are: MOVERS
1) Create a hole in the shape of the window you want in your room.
2) In a box somewhere off your map create a block slightly smaller than the size of the window you want (by about 4 units), select all the textures for it, bring up the texture properties (F5) and click the invisible box. (This is the part that will stop the player walking through it which we will call the collision wall).
3) Create a sheet also slightly smaller than the gap you want for your window, and place it just in front of your block. (A sheet the same size can cause strange HOM effects when they touch the sides) and use a glass texture (from GenLN.utx) Make it transparent (from properties again), and possibly unlit too (fiddle to get the best look).
4) Intersect these (place your red brush so it
envelopes both the new brushes).
5) Now following this example of the mover's properties,
give it an event of "boom".
Set bDamageTriggered to true.
Set bTriggerOnceOnly to true.
Set the move time to 0 so that the player won't
see it happen.
Set it to Trigger Toggle in its initial state.
6) Set keyframe1 to somewhere way underneath your map so that its well out of the way.
7) Now to add the effect of broken glass you need to add the "BreakingGlass" actor to your map which you will find under effects/exploding wall in the actor browser. Place it in a central position in front of the window call it "boom" in its tag field so that the mover will trigger the effect of glass smashing.
8) Under the "effects" property of the breaking glass actor, set it "bOnlyTriggerable" to true to make sure that the glass won't smash without the window actually moving. You should also set the collision radius of the breaking glass actor to something small like 5 high and 5 radius so that it won't get in the way when you fire.
8) Now all you need to do is try it out!