The Black Sheep Wiki
The Black Sheep Wiki
Search:
Ued2 | Lights, Triggered Off, Destroyable

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


How realistic is a light if you are unable to destroy it?
And that even if you are sending a warhead on it.

This tutorial show you how this could be done.

To be able to follow and understand this tutorial it is important that
you understand lights, movers and triggers.

Simply said, we use a mover for the actual light gfx, a trigger light
for the light itself and a breaking glass for the shards.

The design is simple. A small room with no standard light sources.

The first thing to do is to add two movers with different textures
on each side.
On the first side, which is the side we see when starting the level,
I used a regular light textures from “playershp.utx”.
On the other side I used a broken version of the same texture.

The mover is triggered by damage and have initial state “TriggerControl” and
“bTriggerOnlyOnce” true.
For keyframe 1 I simply rotated the mover so that when triggered it will show
the other side instead, which is the broken light texture.
Therfore it is important that “MoveTime” is zero and “bDynamicLightMover” is true.

The event of each mover is uniqe as they will trigger different lights.
Type “LightDestroyed1″ for “Events”, “Event” on the first mover and “LightDestroyed2″
for the second.

Add a TriggerLight (found under “Light” in the actor browser) and place one infront
of each mover.
Change the tag to “LightDestroyed1″ for the first light and “LightDestroyed2″ for
the second.
Also make sure that both are “bInitialOn” True and “InitialState” “TriggerTurnsOff”.

Now we have the light and actual light.
For the shattering we need the effect “BreakingGlass” found under “Effects” and
“ExplodingWall”.
Place one infront of each mover.

Change the following properties for both actors:
BreakingGlass, NumParticles: 4
BreakingGlass, ParticleSize: 0.3
Collision, bCollideActors: False
Collision, bCollideWorld: False
Collision, bProjTarget: False
Effects, bOnlyTriggerable: True
ExplodingWall, bTranslucentGlass: True
ExplodingWall, bUnlitGlass: True
ExplodingWall, GlassTexture: [A glass texture, maybe from genin.utx]

Also check that each Breaking Glass actor have “LightDestroyed1″ or “LightDestroyed2″
in the Tag.

Now, this should be enough.
Try it and see what true lights should be like.

This is how it works:
The mover works as the trigger and will be activated when damaged.
This means that you can “destroy” the lights from any angle, as long as you
hit the mover.

The mover turns around, showing the broken light texture instead, and triggers
the event.
Both the light and breaking glass actor will be triggered resulting in the
shutdown of the light and a few shards falling on the ground.

This is, as it have been done, an irreverseable effect and might not be such
a good solution to use at all lights in a level as it will turn out pretty dark afterwards.

Page last modified on August 01, 2006, at 11:28 PM