How did Valve do the breakable window bars from the coast/wasteland levels?
From observation, the following happens:
Before:
(1) There are windowbars, which are a model.
(2) There is a glass windowpane.
After:
(1) The windowbars are now "broken" with shards of the origional bars
remaining.
(2) The glass windowpane shatters.
I can get the glass windowpane to break just fine by making it a brush-based
func_breakable, but I can't get the windowbars to break. I put them in as a
prop_detail and had the glass func_breakable "on break" trigger the bars to
"break", but nothing happened to the windowbars when the glass broke!
I also noticed that the windowbars model
(models/props_wasteland/woodwall030b_window01a_bars.mdl) has no "broken"
animation that I can see, so my current thinking is that the windowbars
model gets disabled and either another "broken" model gets simultaneously
enabled, or some brush-based "broken bars" get enabled. However, I can't
find any broken window bars models, and I doubt that the bars seen in game
are brushes since they look smaller than 1 unit.
[addsig]
1
Re: Breakable Window Bars
Posted by Leperous on Sun Jan 2nd at 12:53pm 2005

Leperous
member
3382 posts
788 snarkmarks
Registered: Aug 21st 2001
Location: UK
Occupation: Lazy student
Posted by Leperous on Sun Jan 2nd at 12:53pm 2005
First of all, "being broken" is now actually a submodel (you can view it in the model viewer), NOT an animation.
If you want to break the window bars, try placing them with a prop_physics (or prop_dynamic) entity instead, and tick the "start asleep" flag.
Leperous
member
3382 posts
788 snarkmarks
Registered: Aug 21st 2001
Location: UK
Occupation: Lazy student
Re: Breakable Window Bars
Posted by mazemaster on Sun Jan 2nd at 1:21pm 2005
Posted by mazemaster on Sun Jan 2nd at 1:21pm 2005
That was it. Thanks. Bodygroup 0 is normal and 1 is broken, and by enabling/disabling 2 prop_dynamics at the same times it works. Unfortunately I couldn't get the model to show up with a prop_physics (so im using prop_dynamic), but that could just be due to my ineptitude with prop entities.
[addsig]
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0086 seconds.

Snarkpit v6.1.0 created this page in 0.0086 seconds.

