The Black Sheep Wiki
The Black Sheep Wiki
Search:
Ued2 | Destroyable Walls/Windows

The contents of this tutorial were written by those at http://www.birrabrothers.com/drac/dmain.html


Destroyable walls is in reality not destroyable at all.
What you do is that you trigger a specific actor, ExplodingWall,
which erupt in bits and pieces of glass/wood or walls.

What you actually do when you create most exploding windows and walls
is that you use a mover that is triggered by damage and then
move the mover out of sight of the player.
The mover then trigger the “ExplodingWall” actor.

This is some of the properties you can adjust:

PropertySpecific
+Effects 
bOnlytriggerableIf the actor is to be triggered by other trigger or by damage.
  
+ExplodingWall 
BreakingSoundThe sound effect to be played when triggered.
bTranslucentGlassIf glass pieces should be transparent.
bUnlitGlassGlass pieces affected by light.
ExplDimensionExplosion area.
ExplosionSizeExplosion area.
GlassParticleSizeSize of the pieces.
GlassTextureTexture used on glass pieces.
HealthDo not seem to be used, expl wall need to be triggered.
NumGlassChunksAmount of glass pieces to be created.
NumWallChunksAmount of wall pieces to be created.
NumWoodChunksAmount of wood pieces to be created.
WallParticleSizeSize of the pieces.
WallTextureTexture used on wall pieces.
WoodParticleSizeSize of the pieces.
WoodTextureTexture used on wood pieces.

Collision:
The “ExplodingWall” and “BreakingGlass” actor will block
bullets.
Make sure it do not block weapon fire by setting “+Collision”,
“bCollideActor” and “bProjTarget” false.

Creating breakable windows/walls:
First create two rooms 256×256×256 with a 16 unit wide gap.
Then create a small brush 128×128×16 and subtract it between
the two rooms creating a small opening.

Texture and light it as you wish.

Now we will start to create the mover.
Create a sheet sized 128×128 and AX_Xaxis.

Place this sheet in the middle of one of the rooms, in mid air.
Select any glass texture you want (some good ones in GenIn.utx),
and press “Add special brush”. Select Regular Brush, check for
Transparent and press Ok.

Create another identical brush 16 units apart from the first one.

Now create a brush 127×127×15 and place it exactly in between
both window sheets.
Press “Add special brush”, select invisible collision hull and
then Ok.

You should now have a “chunk” of window in mid air.

Now create a brush 200×200×32 and make it surround both sheets and the
collision hull.
Press the “Intersect” button and you should have a nice brush.

Move this brush in the opening of the two rooms and add it as a mover.

When done delete the three objects we created in the middle of the room.

Now select the keyframe 1 for the mover and move it outside of the level where
no-one will be able to see it. Select keyframe 0 again and it will be back
inside the opening.

Now open the properties window for the mover and expand “Object”.
For “InitalState” you select “TriggerControl”.
Then expand “Mover”.
For “MoveTime” you set 0, “bTriggerOnceOnly” and “bDamageTrigger” to True
and “DamageThreshold” to 10.

This mover will now only be triggered if an amount of damage is inflicted equal
or greater than 10.

But no shards will come from this.

Expand “Events” and type “broken” for “Event”.

Now open the actor browser, expand “Effects” and “Exploding wall”.
Select “Breaking glass” and add it in the middle of the opening/mover.
(If you wanted to create breakable walls you select “Exploding wall” instead).

Open the properties for the “Breakable glass” actor and expand “Events”.
For the “Tag” you type “broken”.
This connects the actor with the mover.

Expand “Effects” and select True for “bOnlyTriggerable”.
Expand “ExplodingWall”, select True for “bTranslucentGlass” and
“bUnlitGlass”.
Also add the texture you used for the sheets to the property “GlassTexture”.

You also need to check all options under “Collision” false or the “Breaking glass”
actor itself will stop bullets, which we do not want.

Now it should be complete.

If you want to try it, add a player start and rebuild.

What we have done is simply a mover that will be triggered when we inflict
10 or more damage to it.
The mover will then trigger the “broken” event when it has completed its
move cycle, which take zero seconds.

In the end the “Breakable glass” actor will create and spread lots of glass
looking effects around, giving the player a firm illusion of destroying a window.

Destroyable mechanics:
To create mechanics that break is more or less pretty much the same thing.
If you take a look at AS-Frigate you will see that the pressure pump only
change appearance and smoke suddenly show when it is destroyed.

This is how it is done…

(I have moved the mover a few steps to the right. It should be in the middle of
the ‘pump’).

The players only see one side of the mover which show an intact machine.
When they shoot at the pump the ‘fortstandard’ will be ‘destroyed’ and trigger
an event.
This event triggers the mover which only flips side in zero seconds.
The other side of the mover has a texture of a broken machine giving players
the illusion of destroying the pump.

What about the smoke and the sound?

You will also see in this picture a horse/griffin head infront of the pump.
This is a ‘SmokeHose’ and has a ‘SmokeHoseDest’ close to the roof of that room.
The SmokeHose is ‘InitiallyActive’ false and is activated when triggered.

In the left corner you can see a “SpecialEvent” (triggerclass) which is triggered
at the same time as the rest and it contain one ambient sound;
‘AmbModern.Looping.steam3′.

Smokehose properties:

PropertySpecific
+Smokehose 
BasepuffsizeSize of each ‘cloud’.
bInitiallyActiveIf the smoke hose should be active from start or when triggered.
SizeVarianceVariance in size of each ‘cloud’.
SmokeAccel[]Increased speed in specific direction.
SmokeDelayTime between each ‘cloud’.
SmokeDelayVarianceVariance in time between each ‘cloud’.
SmokeSpeedBase speed of each ‘cloud’.
SpeedVarianceVariance in speed of each ‘cloud’.
TotalNumPuffsTotal amount of ‘clouds’ before smokehose stops.

Explosions:
If you want to create explosions you need to use ‘ExplosionChain’ actors.
As with ‘ExplodingWalls’ you need to have ‘bOnlyTriggerable’ true or false.

Here are the properties you can adjust:

PropertySpecific
+ExplosionChain 
DamageAmount of damage inflicted upon players.
DelayTimeDelay after triggerd and the actual explosion.
MomentumTransferPower from the blast.
SizeSize of the explosion.
Page last modified on July 31, 2006, at 09:17 PM