collapsing_tower

From Valve Developer Community
Jump to navigation Jump to search


The collapsing_tower prefab.

A prefab located in the Prefabs HL2 folder, containing the kind of breakable wooden tower seen along the canals in Half-Life 2.

This prefab includes the following:

  • The func_physboxes that make up the tower. (All are breakable except two metal support struts.)
  • An npc_metropolice standing on top of the tower.
  • A filter_activator_class that prevents the npc_metropolice from breaking the boards he is standing on with his own weight.
  • A logic_relay that is used channel information between a breaking physbox and the other physboxes. (This will limit the I/O traffic possibilities to just one set.)
  • An env_physexplosion that can optionally be set to be triggered through the logic_relay to make the tower collapse outward.
  • A prop_physics explosive oildrum to facilitate doing damage to the physboxes.

When one of the breakable func_physboxes are broken, it will send a signal to the logic_relay, that in its turn will trigger the collapse of the whole tower by enabling the motion of all its physboxes. The relay will also kill the npc_metropolice as the collapse starts, to turn him into a realistically falling ragdoll.