Gel (Portal 2)

From Valve Developer Community
Revision as of 02:06, 5 February 2014 by Yar Kramer (talk | contribs) (Notes)

Jump to: navigation, search
The Repulsion gel effect.

Gel or paint is a puzzle element of Portal 2. It flows out of droppers in blobs, and covers any surface or object it splashes on, changing its physical properties and coloring it if blue or orange. Water streams behave the same way gel does, but cleans gel off surfaces. Gel streams can be redirected with portals and funnels.

Note:For gel to render properly, you must have at least one light entity.

There are three main types of gel. Repulsion gel is blue, and causes things to bounce around. Propulsion gel is orange, and makes objects slippery and players move quickly. Conversion gel is white, and allows the placement of portals.

Note:The stick gel does not do what it is suppose to do anymore. It was taken out of the game. However if you enter in stick gel value you will get a really white gel (whiter than conversion gel) that when it covers a surface it looks like conversion gel. This gel, however, now reflects lasers to power laser catchers and relays. If it splashes on you or covers objects(besides cubes) it will look like speed gel. This gel also will stop a speed gel covered cube or object. If you use this gel with a Prop_paint_bomb then when it explodes it will explode purple. These last two things are leftover parts of the programming.

Creating a Gel Dropper

Using an instance

1. Create a func_instance entity with the following properties:

Property Name Value
Fix up Name gel_dropper
VMF Filename instances/gameplay/paint_dropper.vmf
$paint_sprayer gel_sprayer
$trigger_to_start start
$trigger_to_stop stop
$paint_type 0 = Bounce, 1= Stick, 2 = Speed, 3 = Conversion, 4 = Water

If the cube dropper doesn't show up then save and reload so you can position it properly.

2. Create the entity you want to activate the gel dropper, such as a trigger_once at the entrance to the room, and give it the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger gel_dropper-start Trigger 0.00 No
Note:Hammer will indicate that this is invalid. Ignore it.

From scratch

Note: The following applies to the Underground theme mostly.

1. Create your pipe system using prop_statics. Use the 'Color' setting to change the color of the "Gel Flow" sticker. Make sure you have a proper dropper model at the end, and also use an 'interior cap' model inside the dropper.

2. Create an info_paint_sprayer, and place it inside the dropper.

3. Give it the settings that your map requires.

4. Trigger the 'Start' and 'Stop' inputs as required.

If you want to create paint bombs, then the process is slightly more complex:

1. Create your pipe system.

2. Create a prop_paint_bomb, and give it a name like "paint_bomb"

3. Create a point_template. Give it a name like "paint_bomb_temp" and set 'Template 01' to "paint_bomb"

4. Trigger 'ForceSpawn' of "paint_bomb_temp" with your output of choice (e.g. a button). If want them to drop at a regular time interval, use a logic_timer, and trigger 'ForceSpawn' using the 'OnTimer' output.


1. For paint to function in your map you need to turn on the flag "Paint in map" in the map properties. This includes sticking to surfaces as well as affecting physics objects; boxes will look painted, but they will not act painted.

2. For paint to stick to surfaces you NEED to run RAD on Fast or Normal, otherwise it will only coat certain entities like turrets and cubes.

3. Gels won't appear if the maps are leaked.

4. There does not seem to be a way to put objects into a painted state through the I/O system, though there are inputs to remove paint. Nor does there appear to be any way of detecting when gel or water lands on a particular surface.

See Also