trigger_catapult

From Source Entities
Jump to navigation Jump to search

Code classes:

Trigger.png

trigger_catapult is a brush entity present in P2.pngPortal 2 and Tf2.pngTeam Fortress 2. It launches objects.

Tip: Debugging info for this entity can be seen by doing ent_bbox trigger_catapult in the console.

Keyvalues[edit | edit source]

Player Speed (playerSpeed) <float>
Speed at which to try to launch players.
Physics Object Speed (physicsSpeed) <float>
Speed a which to try to launch physics objects.
Launch direction (launchDirection) <angle>
Direction objects should be launched in.
Launch target (launchTarget) <target_destination>
An entity that should be launched at, instead of a launch direction. Trajectory may be adjusted in order to hit the target.
Use Exact Velocity (useExactVelocity) <boolean>
If using Launch target, makes the trigger avoid adjusting the object speed.
Exact Solution Method (exactVelocityChoiceType) <choices>
If using Launch target and Use Exact Velocity, there will be two possible trajectories to the target, one going higher than the other, and the other going through the most direct arc possible. This tells the entity which one to use.
  • 0: Best
  • 1: Solution One
  • 2: Solution Two
Use Threshold Check (useThresholdCheck) <boolean>
If set, objects are only launched if the object is going at a speed within the bounds of Lower Threshold and Upper Threshold, and possibly within a range of directions specified by Entry Angle Tolerance.
Lower Threshold (lowerThreshold) <float>
If using Use Threshold Check, a lower boundary to check before flinging objects. Objects must be moving above launch speed - (launch speed * threshold). If this number were 0.2 and Player Speed was 1000, a player would have to be moving at least 800 units per second to get launched. Negative values do not work.
Upper Threshold (upperThreshold) <float>
If using Use Threshold Check, an upper boundary to check before flinging objects. Objects must be moving below launch speed + (launch speed * threshold). If this number were 0.1 and Player Speed was 1000, a player would have be moving less than 1100 units per second to get launched. Negative values do not work.
Entry Angle Tolerance (entryAngleTolerance) <float>
If using Use Threshold Check and Launch target, the object must be moving in a direction this close to the intended direction in order to be launched. Must be a number between 1 and -1. 1 means the exact direction, 0 means within 180 degrees, -1 means any angle is accepted.
Only check velocity (onlyVelocityCheck) <boolean>
Makes the trigger skip the catapulting step and simply fire OnCatapulted when it finds something. If using Use Threshold Check, it must meet all the speed and angle constraints in order to fire. If using Launch target, Use Threshold Check must be used and the constraints must be met in order for the output to fire.
Apply angular impulse (applyAngularImpulse) <boolean>
Gives physics objects some random spin when they're catapulted.
Air Control Suppression Time (AirCtrlSupressionTime) <float>
When a player is launched, for how many seconds to suppress their ability to air strafe. If set for too long, players will have no air control even after landing! Does not suppress air control at all if set to -1. Does not work in Tf2.png.
Do Air Control Suppression (Not in FGD) (DirectionSuppressAirControl) <boolean>
Pointless boolean. Air control suppression can be prevented entirely simply by leaving Air Control Suppression Time at -1.

Inputs[edit | edit source]

SetPlayerSpeed (Not in FGD) <float>
Sets Player Speed.
SetPhysicsSpeed (Not in FGD) <float>
Sets Physics Object Speed.
SetLaunchTarget (Not in FGD) <float>
Sets Launch target.
SetExactVelocityChoiceType (Not in FGD) <float>
Sets Exact Solution Method.

Outputs[edit | edit source]

OnCatapulted
Fires when an object was detected and met all the necessary constraints to be catapulted.