Pushing and nudging projectiles

D

Deleted member 33500

I have seen some people ask about this around the forums and Discord server from time to time, and I think it is interesting enough, so I have decided to make a small guide that is all about applying forces to projectiles! And as with everything in TF2, it can get quite jank.



Methods of Pushing Entities
Here is a few methods to pushing entities around, with notes co-related to pushing projectiles specifically:

trigger_push: A trigger that applies a force to applicable entities within its volume every half a second.​
◦ Only affects projectiles detected by triggers. (see table below)​
◦ For projectiles, it only applies its force once if the trigger is stationary.​
trigger_apply_impulse: Applies a force to applicable entities within its volume whenever it receives the ApplyImpulse input.​
◦ Only affects projectiles detected by triggers. (see table below)​
trigger_catapult: Launches applicable entities in a specific direction or at a specific target.​
◦ Does not launch projectiles. Still fires the OnCatapulted output for projectiles that can be detected by triggers, but the Speed Threshold Check seems to unfortunately not work.​
trigger_vphysics_motion: Modifies the physics of entities within its volume. Customizable, but does not affect all entities.​
◦ Tends to only affect projectiles that are not detected by triggers (see table below)​
point_push: Can repel or suck in entities from/to where this entity is.​
◦ Tends to only affect projectiles that are not detected by triggers (see table below)​
◦ Cannot be filtered​
BaseVelocity: Unlike other methods, this is a keyvalue on individual entities rather than an entity. When changed using AddOutput, it will add its value to the entity's velocity, and reset itself back to 0 0 0. Unsure how many entities have this, but I am aware that some projectiles do have this.​



Detecting Projectiles with Triggers
In order to make any trigger detect and affect projectiles, you need to tick the Everything flag in the trigger's Flags tab.

If you want triggers to only detect and affect projectiles, you will need to put down a filter_activator_class, name it and set its Filter Classname keyvalue to tf_projectile*, and then set the trigger's filter to your newly created filter - this will make the trigger check if the classname of whatever is touching it starts with tf_projectile.


The List of All Projectiles
As I have mentioned, what projectiles can get affected by varies, and for that reason I have tested every projectile out and made a list of what projectiles are affected by what, and if they can be detected by triggers.

Projectile​
Class Name​
Detected By Triggers​
Velocity Affected By​
Arrow
Fired by: Huntsman, Fortified Compound

Repair bolt
Fired by: Rescue Ranger
tf_projectile_arrow
Yes
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Flame ball
Fired by: Dragon's Fury
tf_projectile_balloffire
No
• Nothing
Ornament
Fired by: Wrap Assassin
tf_projectile_ball_ornament
No
• trigger_vphysics_motion
• point_push
Flying Guillotinetf_projectile_cleaver
No
• trigger_vphysics_motion
• point_push
Energy rocket
Fired by: Cow Mangler 5000
tf_projectile_energy_ball
Yes
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Laser ray
Fired by: Pomson 6000, Righteous Bison
tf_projectile_energy_ring
No
• BaseVelocity keyvalue
Flare
Fired by: Flare Gun, Detonator, Scorch Shot, Manmelter
tf_projectile_flare
Yes
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Grappling Hooktf_projectile_grapplinghook
Yes
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Healing bolt
Fired by: Crusader's Crossbow
tf_projectile_healing_bolt
Yes
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Jarate, Self-Aware Beauty Marktf_projectile_jar
No
• trigger_vphysics_motion
• point_push
Gas Passertf_projectile_jar_gas
No
• trigger_vphysics_motion
• point_push
Mad Milk, Mutated Milktf_projectile_jar_milk
No
• trigger_vphysics_motion
• point_push
Energy orb
Fired by: Short Circuit
tf_projectile_mechanicalarmorb
No
• BaseVelocity keyvalue
Pipebomb
Fired by: Grenade Launcher, Lonch-n-Load, Iron Bomber, Loose Cannon
tf_projectile_pipe
No
• trigger_vphysics_motion
• point_push
Stickybomb
Fired by: Stickybomb Launcher, Quickiebomb Launcher, Scottish Resistance, Sticky Jumper
tf_projectile_pipe_remote
No
• trigger_vphysics_motion
• point_push
Rocket
Fired by: Rocket Launcher, Original, Beggar's Bazooka, Air Strike, Black Box, Liberty Launcher, Rocket Jumper

Eye ball
Fired by: MONOCULUS
tf_projectile_rocket
Yes
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Quad rockets
Fired by: Sentry Gun
tf_projectile_sentryrocket
Yes
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Baseball
Fired by: Sandman
tf_projectile_stun_ball
No
• trigger_vphysics_motion
• point_push
Syringe
Fired by: Syringe Gun, Blutsauger, Overdose
tf_projectile_syringe
Yes
• Nothing
Ball'O Lightning spelltf_projectile_lightningorb
No
• BaseVelocity keyvalue
Swarm of Bats spelltf_projectile_spellbats
No
• trigger_vphysics_motion
• point_push
Fireball spell
Created by: Meteor Shower spell
tf_projectile_spellfireball
Yes
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Meteor Shower spell
Note: This is the fiery projectile that will cause the meteor shower, not the meteors themselves - those are the Fireball spell projectile
tf_projectile_spellmeteorshower
No
• trigger_vphysics_motion
• point_push
Pumpkin MIRV spell
Note: This is the initial pumpkin bundle, not the pumpkin bombs summoned - those are the pumpkin bomb projectile
tf_projectile_spellmirv
No
• trigger_vphysics_motion
• point_push
Pumpkin bomb
Created by: Pumpkin MIRV spell
Note: For some reason, both its trigger detection and what it is affected by changes when it is fully deployed - when it hits a solid surface, and its model changes into a pumpkin bomb from a tiny pumpkin grenade
tf_projectile_spellpumpkin
While deploying:
No

After deployed:
Yes
While deploying:
• trigger_vphysics_motion
• point_push          

After deployed:
• trigger_push
• trigger_apply_impulse
• BaseVelocity keyvalue
Summon MONOCULUS spelltf_projectile_spellspawnboss
No
• trigger_vphysics_motion
• point_push
Skeletons Horde spelltf_projectile_spellspawnhorde
No
• trigger_vphysics_motion
• point_push
Skeleton summoning grenade
Created by: Skeletons Horde spell
tf_projectile_spellspawnzombie
No
• trigger_vphysics_motion
• point_push
Shadow Leap spelltf_projectile_spelltransposeteleport
No
• trigger_vphysics_motion
• point_push



If I have forgotten anything of importance, or you have a suggestion or feedback on this guide, then please tell me, and I will correct my mistake.

Hope you may find this guide helpful, and have fun sending projectiles off into space!
 
Last edited by a moderator: