This article relates to the game "Portal 2". Click here for more information.

prop_tractor_beam

From Valve Developer Community
Jump to: navigation, search
English (en)Français (fr)Русский (ru)Translate (Translate)

Class hierarchy
???
CBaseAnimating
CBaseEntity
An excursion funnel in Portal 2.

prop_tractor_beam is a point entity available in Portal 2 Portal 2.
It is a model that emits a projected_tractor_beam_entity.
Excursion funnels are a puzzle element of Portal 2 that work like tractor beams. Objects (like turrets and cubes) and players that touch blue funnels slowly drift away from the emitter, unaffected by gravity, or towards the emitter if the funnel is orange. Players can remove objects and themselves from the funnel but can not move against the flow.

Like bridges and lasers, funnels can be extended through portals.

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Linear Force (linearForce) <float>
Linear force to apply to objects in the beam. The color and direction of spin will automatically change when the value becomes negative. Most Valve-created Excursion Funnels have a linear force of 250, so likewise the reverse funnel should be -250.
Icon-Bug.pngBug:All funnels on screen are rendered with the same speed, causing a flickering effect if the speeds are different. Ensure the player is never able to see multiple funnels moving at different speeds. (Funnels moving at the same speed in opposite directions, for example 250 and -250, are fine.)  [todo tested in?]
Disable Emitter Particles (noemitterparticles) <boolean>
Disable the whirly particles on the emitter.
Use 128 model (use128model) <boolean>
Use the tractor beam projector model that fits within a 128 unit square (the default model is 167 units wide)
Primary Color (primarycolor) <color255> (only in Portal 2: Community Edition)
Colour of the funnel when it is moving forwards.
Secondary Color (secondarycolor) <color255> (only in Portal 2: Community Edition)
Colour of the funnel when it is moving backwards.

BaseProjector:

Start Enabled (StartEnabled) <boolean>
If the projector should start enabled.
Disable Placement Helper (DisableHelper) <boolean>
Disable the automatically-created placement helper to prevent it from fighting with a custom one.
Render in Fast Reflections (drawinfastreflection) <boolean> (in all games since Portal 2)
If enabled, this entity will render in fast water reflections (i.e. when a water material specifies $reflectonlymarkedentities) and in the world impostor pass.

Inputs

SetLinearForce <float>
Set the linear force applied to objects in the beam. Standard value: 250, negative numbers can be used to reverse the flow.
SetPrimaryColor <color255> (only in Portal 2: Community Edition)
Changes the primary colour of the funnel.
SetSecondaryColor <color255> (only in Portal 2: Community Edition)
Changes the secondary colour of the funnel.
BaseProjector:
Enable
Enables projection from this projector.
Disable
Disables projection from this projector.

Creation

Each funnel consists of a prop_tractor_beam and a player clip in front. Funnels often have a light in front of them for a soft blue glow (with an approximate brightness of 50 120 250 50). This is sometimes left out when the beam is reversible because it conflicts with the orange color of the funnel; a simple workaround, however, is to place two lights—one blue, one orange—and have them be enabled/disabled by the same event as that which reverses the funnel.

Grating Walls

In order to create a wall that will let the tractor beam to go through it but it will block players or a prop_weighted_cube from passing through, three separate brushes/entities must be combined.

  • func_brush brush entity with a Solidity property set to "Never Solid" (will be the only visible brush to the player)
  • player clip brush will block player's movements
  • func_clip_vphysics brush entity will block weighted cube movement

If Paint Bombs are present, a filter_activator_class will be needed to allow the paint to pass through the grating.

Tractor Beam Music

In Valve's official maps, there is a special soundtrack that plays when the player enters a funnel. The logic behind this is handled in Soundscripts. For a WIP tutorial on how to create your own funnel music, see Creating custom Portal 2 funnel music.

External links

Example map with a VMF included.