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

Prop tractor beam: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (moved Funnel (Portal 2) to Excursion Funnel over redirect: page should use official title)
m (edited grammar and fixed weird formatting)
 
(80 intermediate revisions by 36 users not shown)
Line 1: Line 1:
{{stub}}
{{LanguageBar}}
{{p2 topicon}}
{{CD|???|base=CBaseAnimating}}
[[File:1024_excursionfunnel.jpg|thumb|right|300px|An excursion funnel in ''Portal 2''.]]
{{this is a|model entity|name=prop_tractor_beam|game=Portal 2}} It is a model that emits a <code>[[projected_tractor_beam_entity]]</code>. Excursion funnels are a puzzle element of ''Portal 2'' that work like tractor beams.
Objects (like [[Npc_portal_turret_floor|turrets]] and [[Prop_weighted_cube|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 cannot move against the flow.


Excursion funnels are a game mechanic in Portal 2 which can be thought of as tractor beams. When a physics prop or the player enters an excursion funnel, they are held inside the funnel and slowly pushed through the funnel until they reach the end (excursion funnels are eventually cut off, typically by a brush or a static prop) at which point they remain still until the funnel is disabled. The player can leave the funnel at any time by moving towards the edge until dropping out of the beam. The player can also remove physics props from the funnel by grabbing them with the Use key.
Like [[bridge (Portal 2)|bridges]] and [[laser (Portal 2)|lasers]], funnels can be extended through [[portals]].


Like [[Light Bridge|light bridges]], excursion funnels can be extended by placing a portal at one end and the other portal somewhere else in the map.
==Keyvalues==
{{KV Targetname}}
{{KV|Linear Force|intn=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.}}
:{{bug|hidetested=1|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.)}}
{{KV|Disable Emitter Particles|intn=noemitterparticles|boolean|Disable the whirly particles on the emitter.}}
{{KV|Use 128 model|intn=use128model|Boolean|Use the tractor beam projector model that fits within a 128 unit square, used in [[Puzzle Maker]] maps. The default model is 167 units wide.}}
{{KV|Primary Color|intn=primarycolor|color255|Colour of the funnel when it is moving forwards.|only={{P2CE}}}}
{{KV|Secondary Color|intn=secondarycolor|color255|Colour of the funnel when it is moving backwards.|only={{P2CE}}}}
{{KV BaseProjector}}
{{KV Reflection}}


== Creating an Excursion Funnel ==
==Inputs==
Creating an excursion funnel is a fairly straightforward process. Each funnel consists of a point entity called [[prop_tractor_beam]]. Valve typically puts a [[clip texture|player clip]] brush in front of the prop_tractor_beam model as well as a [[light]] to give a soft blue glow to the area around the model (brightness level of approximately ''50 120 250 50'' is appropriate).
{{I|SetLinearForce|Set the linear force applied to objects in the beam. Standard value: 250, negative numbers can be used to reverse the flow.|param=float}}
{{I|SetPrimaryColor|Changes the primary colour of the funnel.|param=color255|only={{P2CE}}}}
{{I|SetSecondaryColor|Changes the secondary colour of the funnel.|param=color255|only={{P2CE}}}}
{{I BaseProjector}}


To control the flow of an excursion funnel, change the ''LinearForce'' keyvalue of the prop_tractor_beam. You can do this via the input ''SetLinearForce''. LinearForce determines how much force is applied to objects in the funnel. A negative value will reverse the flow. Two good values are 250 and -250 for forward and backward flow, respectively.
==Creation==
Each funnel consists of a prop_tractor_beam and a [[clip texture|player clip]] in front. Funnels often have a {{ent|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.


[[Category:Portal 2 Level Design Tutorials]]
===Grating Walls===
To create a wall that lets the tractor beam go through, but blocks players or a {{ent|prop_weighted_cube}} from passing through, three separate brushes/entities must be combined.
 
*{{ent|func_brush}} brush entity with a Solidity property set to "Never Solid" (will be the only visible brush to the player)
*[[clip texture|player clip]] brush will block player's movements
*{{ent|func_clip_vphysics}} brush entity will block weighted cube movement
If [[prop_paint_bomb|Paint Bombs]] are present, a {{ent|filter_activator_class}} will be needed to allow the paint to pass through the grating.
 
===Tractor Beam Music===
In Valve's official maps, a special soundtrack plays when the player enters a funnel. The logic behind this is handled with [[Soundscripts]]. For a tutorial on how to create custom funnel music, see [[Creating custom Portal 2 funnel music]].
 
== External links ==
[http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=335. Example map] with a VMF included.
[[Category:Portal 2 Level Design]][[Category:Portal 2 Tutorials]]
 
[[Category:Prop entities|tractor beam]]

Latest revision as of 11:53, 2 July 2025

English (en)Français (fr)Русский (ru)中文 (zh)Translate (Translate)

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

prop_tractor_beam is a model 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 cannot move against the flow.

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

Keyvalues

Name (targetname) <string>[ Edit ]
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.)
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, used in Puzzle Maker maps. 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 <floatRedirectInput/float>
Set the linear force applied to objects in the beam. Standard value: 250, negative numbers can be used to reverse the flow.
SetPrimaryColor <color255RedirectInput/color32> (only in Portal 2: Community Edition)
Changes the primary colour of the funnel.
SetSecondaryColor <color255RedirectInput/color32> (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

To create a wall that lets the tractor beam go through, but blocks 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, a special soundtrack plays when the player enters a funnel. The logic behind this is handled with Soundscripts. For a tutorial on how to create custom funnel music, see Creating custom Portal 2 funnel music.

External links

Example map with a VMF included.