Sticky Stopper

Sticky Stopper v1

14bit

L14: Bit Member
aa
Oct 5, 2014
642
2,069
Sticky Stopper - Make stickies work with moving/dissapearing platforms and props

Long have we sought a way to make stickies work nicely with moving objects in TF2, and today I finally present one possible solution: The Sticky Stopper!

This is an entity setup consisting of a trigger, a filter, some relays, a point_push, and a prop_dynamic with a special parentname that will allow you to make:
  • Moving objects that stickies only stick to when they are stopped
  • Platforms that stickies can stick to while they exist and fall when they disappear
The basic rundown is that you build your platforms out of prop_dynamics that are specifically set up to not allow stickies to stick, then use a special trigger called a trigger_vphysics_motion to freeze the stickies in place instead of them truly sticking. When you need them to unstick, you send some special inputs to the trigger_vphysics_motion, and give them a kick with a point_push.

I encourage you to open up the .vmf for yourself and take a look at the I/O, there's a lot of specific things you need that are hard to communicate in writing! All necessary entities have documentation written in their comment fields.

Known Bugs:
  • Sometimes the stickies on the disappearing floor setup will get stuck hanging in mid-air. It seems to happen most often if the stickies enter the trigger at a shallow angle. You can partially solve this by making the trigger larger, but it's not an ideal fix since then the stickies will be floating. This does not happen with moving platforms, as their motion seems to help get the stickies unstuck. If anyone can figure this out, let me know and I can update this with a fix!
  • Stickies cannot be airblasted or knocked around with explosions in this setup. If we could find a way to detect stickies with a trigger I have a fix for it, but there is currently no known way to do so.
Important Note!
This solution makes use of some hardcoded shenanigans with parentnames that Valve did for Sawmill's sawblades. If a prop has a parentname of sawmovelinear01 or sawmovelinear02, stickies bounce off of it. An unlimited number of prop_dynamics can have this property by sharing a parent, but since there are only two names you can use, there are some limits. With this solution you can do one of the following:
  • Have two different sets of moving props with these properties
  • Have one set of moving props and unlimited stationary but toggle-able props with these properties
  • Have an unlimited number of stationary but toggle-able props with these properties
It is possible to have more moving objects that act this way if you make them out of func_brushes instead of using prop_dynamics for the collision, but unfortunately Mad Milk, Jarate and other types of projectiles will bounce off. For that reason I have decided not to include examples of this.

Special thanks to @A Boojum Snark who partially solved this years ago in this post, @Pdan4 for suggesting trying to use a trigger_vphysics_motion in conjunction with a point_push, and @Another Bad Pun for pushing me to get it working with moving objects, clean up the logic, implement it into Megalo and release it to the public.
 
Last edited:

nᵗʰSonata

Takes way to long to make and update maps
aa
Jun 11, 2015
433
436
I don't think it'll do anything for buildings, since they aren't effected by physics, but if you want buildings to move with moving objects it is actually possible to parent them to a moving object
 

14bit

L14: Bit Member
aa
Oct 5, 2014
642
2,069
Are buildings also able to be placed on this?
Unfortunately not. Buildings cannot be placed on any prop_dynamic and this requires prop_dynamics to function.

If you are using brush entities instead of props for the collision you can make buildings work, but then all other projectiles aside from stickies will just slide off the brushes. Attempting to catch other types of projectiles with a trigger_vphysics_motion causes some really funky behavior, so things like Jarate and Mad Milk will just freeze on the trigger then explode after a set time. So basically the two options are:
  • Moving/disappearing things that stop stickies and can be built on, but projectiles slide off of (old methods)
  • Moving/disappearing things that stop stickies and projectiles, but can't be built on (this method)
The hard part has always been getting stickies to stop while making all other projectiles work, and this is currently the only known solution. I've tried different properties with all sorts of brush entities, func_clip_vphysics, and messed with tons of different filters to try and get something that can do it all, and at the moment I think this is the best we're going to get.
 

14bit

L14: Bit Member
aa
Oct 5, 2014
642
2,069
Now that the update is out, I can reveal that this logic was built for and featured in the map Megalo, now officially in the game! I'm not officially credited since this was built and added at the last minute, but the logic is there!