WisePhysbox2: func_physbox, part 2
Jump to navigation
Jump to search
This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.
Introduction
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.
Fix
- Let's use my short dock, left-side, for this example.
- 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_physexplosion
s all "PlankExplosion1". - 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.
- For each of these 5 boards change Strength to
0
and flag Motion Disabled and Don't take physics damage. - 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. - 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_relay
s, more of a boom, boom, boom effect with each boom having sub-events but that would require unique names for our boards and explosions. - 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 | |
---|---|---|---|---|---|---|
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 | |
---|---|---|---|---|---|---|
OnTrigger | HorizontalSupports | EnableMotion | 0.00 | No | ||
OnTrigger | PlanksShort1 | EnableMotion | 0.20 | No | ||
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.