Pdan4's Pipe Paste and Prevention Prefab 001b
Stick sticky bombs and/or pipe bombs to brushes, or just delete them.
Now THIS is Computer Science! Some PIPE DOPE from Pdan as an early Christmas present for y'all.
If you want to check out the compiled VMF demo:
The way this works is this:
Quick Notes:
If you want to check out the compiled VMF demo:
- The Blue block will affix your selection.
- The Red cube will delete instead.
- Each Teal pillar sets the filter to stick/remove the embedded projectiles
- The right Orange pillar starts the cubes moving
- The left Orange pillar halts the cubes moving
The way this works is this:
- A func_breakable is flagged as damageable only by physics
- It filters damage taken to allow only stickies and/or pills to hurt it (see Quick Notes).
- When its health changes, it parents !activator (the projectile) to itself and resets its own health.
- Make a func_breakable
- Give it a unique NAME
- Set its Material Type to one that makes sense (for impact sounds) -- don't use Unbreakable Glass as it locks the health.
- Set its Strength to 99999 (five nines)
- Set its Physics Impact Damage Scale to 10000 (four zeroes)
- Flags: disable Bullet Penetration
- Create a filter to specify what you want to target -- use filter_activator_class for moderating pipes/stickies
- Set Damage Filter to allow whatever projectile you want (see Quick Notes)
- Filter must disallow players otherwise you can brick/crash
- To keep from breaking: OnHealthChanged !self SetHealth 99999
- To make stick: OnHealthChanged !activator SetParent NAME
- To make gone: OnHealthChanged !activator kill
Quick Notes:
- tf_projectile_pipe for pill bombs
- tf_projectile_pipe_remote for stickies
- tf_projectile_pipe* for both
- If too thin, stickies will go through (but still be affixed).
- This will spam the console with warnings about updating the physics heirarchy on the attached things. You can ignore these.
- If you SetParent name_of_not_the_func_breakable, there will be a delay before the projectile is frozen and it will embed into the func_breakable, sometimes even enough to disappear from view.
- This has not been tested on servers. Just Locally.
- OnDamageTaken does not work.
- If you use a weird Material Type relative to the visuals of the impact area and I hear, I will :angryduckling: at you.