WisePhysbox2: func_physbox, part 2

From Valve Developer Community
Jump to: navigation, search

This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.


This is a variation of the first physbox tutorial that was requested in the forums.

The problem is all my pieces just fall down. They don't explode or "go anywhere". I don't really want them to break, just want to send them flying far.


  1. Let's use my short dock, left-side, for this example.
  2. Give each of the 5 boards the same name and place an env_physexplosion under each one, lets call these boards "PlanksShort1" and the env_physexplosions all "PlankExplosion1".
  3. You can already see that we've got potential; all we need is crafty timing and a few changes to the board properties. We could make this better by using unique names for the boards and explosions.
  4. For each of these 5 boards change Strength to 0 and flag Motion Disabled and Don't take physics damage.
  5. We need something to trigger our events so let's turn one of the vertical func_detail posts into a func_physbox and when it gets broken we'll trigger our boards. Flag it for Motion Disabled and give it Strength of 10, setting the Prop type and other properties as we did in the first example.
  6. We can now create the effect wanted once we add the events to the logic_relay, to make it even better we could use multiple logic_relays, more of a boom, boom, boom effect with each boom having sub-events but that would require unique names for our boards and explosions.
  7. For the one vertical post we are allowing damage on let's create an output:
  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnBreak LeftRelay Trigger 0.00 No
8. The one logic_relay that just got triggered by the output above has three outputs:
  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger HorizontalSupports EnableMotion 0.00 No
Io11.png OnTrigger PlanksShort1 EnableMotion 0.20 No
Io11.png OnTrigger PlankExplosion1 Explode 0.30 No

You could alter this in a million ways but with the settings I've used here it was impressive as I built the test map.

See Also