Special Effects
UnrealED2 Tutorials by EZkeel
 

Exploding Walls





Email :EZkeel
Accompanied files : ExplodingWall.UNR

As with a lot of effects in level design, an exploding wall is actually an illusion. It is created by creating a hole, and filling it with a block that moves away instantly and triggers off shrapnel to make it look as if it has blown up. Here’s how it's done.
Tutorials you will need to have read are: Triggers, Movers

1) First create a room say 1024 x 1024 x 1024 in size with the usual lighting, player start and SinglePlayer game info in the level properties). We’re going to blow a chunk out of it.

2) Now, you need to create an irregular shape which will be your hole after the damage has happened. For this, you can either use the 2D editor to create a jagged shape, or use the sphere brush. Turn and rotate your brush and have half of it inside the wall, this will give it an irregular looking shape.

3) Now hit the intersect icon and it will flatten itself against your wall. Now hit the subtract icon and your hole will appear in the wall. Texture the hole any way you like, but a base texture will probably look best. Now hit the mover icon and the whole will be filled perfectly with a mover. When the level is running, the wall should look just the same as it would without the hole there but possible with a slight colour difference. (note: If you want the player to have a hint that this needs to be shot at, you can alter the position of the mover ever so slightly to reveal a tiny crack in the wall).

4) Now we need to tell the mover how to act. Bring up its properties and open out the “mover” property. In the “Movetime” field change it to 0 so that the move is instant and cannot be seen. Under the “Object” property pick the “Initial state” field and choose “Trigger Toggle” Now set its first keyframe to 1 and move it so that it is completely off the level. Make sure that the route it takes doesn’t have to go through your player, this may do strange things! (Don’t forget to reset it back to keyfram0). Lastly set the mover’s event field to “Boom” and its tag to “Bang”.

5) Now we need to add an “effect” to create some exploding shrapnel. To make this choose “Effects” from your list of actors and find “Exploding wall” amongst them. Add this to your room roughly in the middle of your hole, just in front of the wall.

6) Now bring up the exploding wall’s properties and label the tag “boom”, that will cause the explosion to happen as soon as the mover has been triggered. Now look in the “exploding wall” property, choose the texture from the texture menu that matches your wall and click on “use” in the “Wall texture”. Also make sure that Effects/btriggeronly only is set to true so that it won’t go off when you don’t want it too. All the other settings there can be adjusted to your preference.

7) Lastly we need to add a trigger to set it all off. (Note: We could set the mover to be “damage triggered” so that it moves when the player shoots at it, we covered this in the smashing window tutorial). From the actors browser, choose trigger. (It must be the one that looks like a switch and not a camel’s head!) add the trigger in about the same place as the exploding wall actor.

8) Set the trigger’s event field to “Bang”. When the trigger is triggered it will move the mover and the mover will trigger the explosion. But we want the trigger to be triggered when you shoot at it and not when you touch it. To do this bring up the trigger’s “Trigger” property and under “Trigger type” choose “TT_Shoot”. Also set the trigger property “btriggeronceonly” to true.

9) You also need to set the collision radius for the trigger so that its big enough to detect if you’ve actually shot the point you want. You’ll need to be able to see the radius of your trigger to do this so you’ll need to change your display windows in the 2D views. Right click on the grey part of the menu bar of the top down 2D window and choose actors/radii view. When you click on the trigger you should now see a blue circle around it. That’s the collision radius of the trigger. For this purpose you’re interested in the height of the trigger so do the same in the menu bar for either your x or y axis 2D window. The radius there will appear as a red square. It probably won’t be high enough. To change the collision height and radius of the trigger simply experiment with the figures in the trigger’s “Collision” property fields.

10) And that’s it. When you’re ready, rebuild the level and test it. The wall should blow up when you shoot at it.