Wiky's Bombable Wall Tutorial.

Lithtech Jupiter engine
Post Reply
User avatar
Spawn
Admin
Admin
Posts: 1124
Joined: Sun Jul 25, 2004 12:50 am
Location: Norway
Contact:

Wiky's Bombable Wall Tutorial.

Post by Spawn » Mon Dec 17, 2018 11:28 pm

This Tutorial will cover how to make a wall that can be blown up with the C4 explosives.

The tutorial was made using the Contract Jack Tools

Download the BombableWallTUT.ltc

Image

Grab the C4!

Image

Plant the bomb.

Image

Explosives!

Image

Holy wall!







Step 1

Build the Basic stuff

Create a cube big enough to walk around, say 512 units.

Hit F to flip the texture (normals) to the inside.

Create another cube surrounding it , flip the texture and paint it with blocker texture, set detail to false. This is the convex cube that most levels should be enclosed in. Set the properties to blocker, and flat for shading.

Add a few lights inside your room with enough radius to extend beyond your walls.

Add an object light, this helps to light objects (like the C4!)

Add the world properties object somewhere out of the way.

Add a game start point about 64 units off the floor of the room, and rotate it towards the middle of your room.



Step 2

Place the C4, ScreenShake and Explosion objects.

A. C4: Put the marker where you want it, right click, add object and select WeaponItem

Select the properties tab from the project window, Set the WeaponType to C4

Rotate it 45° -'cause it looks cool at an angle. Place it on the edge of a table or crate to make it easy for the player to pick up.

B. ScreenShake: Adding the screenshake effect gives your explosion some credibility. Select an out of the way spot and right click -add object -screenshake. Check and change the properties to your liking. I used 3 for the amount.

C. Explosion: Place the marker where the bomb hole will be, and right click, add, object - Explosion.

Change the explosion properties to whatever you want. I chose Explosive charge. Set the radius for the damage.



Step 3

Build the part of the wall that won't be destroyed.

Image

Clean Build it of course.

The entire wall is made out of only 7 single sided brushes.

They are: The three you see selected here, three identical brushes for the other side and one on top of the wall. The Brushes are all joined together.



Step 4

Build the part of the wall that will be destroyed.

This only needs to cover the basic area of the damaged wall that you will create later.

Select it and bind it to a WorldModel. This becomes WorldModel00.

In the WorldModel00 Properties, choose DamageProperties and select can destroy=True.

Image

Select this piece and the rest of your wall from step 3.

Right click, reset texture coordinates. This lines up your texture so the new piece blends in.



Step 5

Build the damaged wall after the destruction.

For this step I created a cylinder as a template, then I basically built a wall around it. I then deleted the cylinder template. Then I went back again and created a basic mesh out of triangles for the inner part of the wall so I could create some random angles. Start by creating a triangle in geometry mode, then copy it and paste it so you have 4 triangles, Join them together (Shift + J) then manipulate them into place using geometry mode.

Using containers during this process helps you to stay organized. Especially when you start to join and un-join different brushes.

Create your debris. I made a box out of triangles, then I manipulated it into random shapes, copied and pasted them around the blowout area.

Select the wall hole, and debris and bind it to a worldmodel. This becomes WorldModel01.

Image



Step 6

In the Worldmodel01 nodes view organize the debris into a container under it.

Set the StartHidden property to TRUE.

Select the debris and set to gouroud shading. This gives the debris a rounded smooth look.

Do this also to the inner ring of the bombed out wall. Everything else, except the outside blocker brush, should be Lightmapped.



Step 7

Set up Da Bomb!

Place the marker where you want the C4 ghost icon to appear. Right click and choose add object, select prop, expand the + , select GadgetTarget, expand the + select Bombable.

Set up the bombable object properties.

Set the detonate time to whatever you want in 3.0 = 3 seconds.

click the . next to the DetonateCommand Field

Input the following:

msg WorldModel00 Destroy;
msg WorldModel01 (hidden 0);
msg Explosion00 on;
msg ScreenShake00 on;



Step 8

Compile and test the level.

Image


UPDATE:

Thanks to EDO who brought it to my attention that you can damage and destroy the wall with guns (or fist for CJ) and not have to use the c4. The reason is in the candamage=true flag on your WorldModel00 properties. I suppose you could set the damage really high so the player would have to spend an hour shooting at it, but why not code it correctly? To remedy this simply go into the properties of your worldmodel00 and set to neverdestroy=true and candamage = false.

Then go into your bombable object properties and replace the following code:

msg WorldModel00 destroy

with

msg WorldModel (hidden 1)

This hides the good wall after the c4 goes off.


Special Thanks to Spydave and EDO for help on this Tutorial.

(Reposted from nicepurchase.com/nolf)
Image

Post Reply