How to make an APC burst through wall

 

Introduction

This tutorial shows how to make an APC (Armoured Personal Carrier) backup through a wall, the back door open, and marines rush out. I assume that you know your way around Worldcraft and have got some mapping experience.

Starting off

Make the room where you want the APC to burst into. Now, beside this room, make a smaller one with just one wall between the two. This is where your tank will be 'stored' before it enters. Now inside this room start building just the back of your APC (you won't be able to see the front later on, so why go through the trouble of making it?), hollow it out but make sure that there's enough space in there to place a monster without it hitting its head.

Once you've finished it, group everything except for the back door together and make that a func_train with the name "train_tank". Give it a 'first stop target' of "tank". Make the back door a separate train with the name "train_tank_back" and a 'first stop target' of "tank_back". Check the flag which says 'not solid' on this one.

Now comes the hard part, I'd set my grid to 1 and zoom in loads because you have to make two path_corners. One has to be exactly in the middle (in all 3 dimensions) of the "train_tank", name that "tank", do the same thing with the door and name it "tank_back". Make sure the flag "wait for retrigger" is checked on both and they have "tank2/tank_back2" as the 'next stop'.

Now select both of the path_corners at the same time (Ctrl + click) and copy & paste them. Make sure the new ones are exactly the same height of the floor as the originals and just drag them to the position at which you want the tank to stop. Just add a "2" behind their names and delete the "2" behind the 'next stop'. To make sure that the positioning of the path_corners is correct add a multimanager which trigger both the "train_tank" and the "train_tank_back"" at the same time, create a trigger_once to trigger the multimanager and compile. You might have to fiddle around with the 'path_corner' entities.

The Wall

Now lets have the wall explode when the tank drives through. For this you'll first have to make a brush with the same texture as the walls, a bit bigger than the back of you tank. Place that into the wall separating the two rooms between the tank and the player and carve a hole (this brush is just so that your wall isn't broken into loads of little pieces later on). Your wall should now still look as if it was all one brush. Now, inside your new brush, place yet another brush which is exactly as big as the back of your tank, carve yet another hole and delete that brush again. If you now run your map and have the tank backup it should fit exactly through the hole without any spaces. Now make smaller triangular brushes, rotate them a bit and carve holes along the border so that it really looks like broken concrete

Now make yet another brush which is just so big that it covers all of the gaps, now, once again, your wall should look like it was all in one piece again. Select this new brush, click 'toEntity' and choose func_breakable'. Now chose the right material type, set the 'trigger only' flag and name it "wall_bust". You can now, at the same time you trigger the tank, trigger the "wall_bust". If you want more rubble, you can add an 'env_shooter', play around with it a bit until you've got it exactly the way you want it. So, if you compile and run your map now, you'll already have a tank bursting backwards through the wall.

The Door

Now comes the hardest part: the back door opening. Select the original back door of the tank, copy & paste it. Now move the copy so that the "tank_back" 'path_corner' is exactly in the centre of it meaning that if you run the map and have the tank back up, you should no longer notice that there are two doors above each other. Select the copied door and click 'toWorld', now add an origin brush right where you want the hinge to be, select both the origin and the door, click 'toEntity' and choose the 'func_rotating_door', name this "tank_back_door". Give it a 'distance(deg)' of aprox. 100 to 110, set the 'render mode' to texture and the amount to 0, this makes the door invisible, also make sure that the 'X-Axis' (or Y-Axis) flag and the one-way flag are checked, you might have to also check the 'Reverse Dir' flag if the door opens the wrong way. Now add two 'env_render's, name both "render_door". Give one the target "train_tank_back", 'Render mode' to 'texture, and amount to 0, the other one should have the target "tank_back_door" and a 'render mode' of 'normal'.

Create a multimanager called "render_mm" with targets the "render_door" after 0 secs and the "tank_back_door" after about .5 secs. In here you can also target aiscripted_sequences if you want the marines inside to charge out.

Now select the path_corner named "tank_back2" and for 'fire on pass' write "render_mm".

You should now have a perfectly working sequence where an APC bursts through a wall and marines come charging out!

The Tutorial map

I made this map just to show the basics of how the whole thing works, this is by no means perfect, and after reading this tutorial you should be able to make one which is a lot better.

You can download the map here.

_____
JoNaS