Difference between revisions of "Gel (Portal 2)"

From Valve Developer Community
Jump to: navigation, search
m (External links)
Line 7: Line 7:
 
There are three types of gel, and water. 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 [[portal|portals]].
 
There are three types of gel, and water. 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 [[portal|portals]].
  
==Creation==
+
==Creating a Gel Dropper==
Use an [[info_paint_sprayer]].
+
1. Create a [[func_instance]] entity with the following properties:
  
* Set the Paint Type in the info_paint_sprayer's properties to select blue/orange/white gel or water.
+
::{| class=standard-table
* Set its Start Active? property to Yes if you want it to always drop paint. 
+
! Property Name || Value
* You will probably want a [[dropper]] as a prop, such as item_dropper.
+
|-
* Make sure you set "Paint in map" in the Map Properties to yes, or paint won't adhere to surfaces.
+
| Fix up Name || gel_dropper
 
 
== Tutorial ==
 
Cave Johnson here, in this tutorial I will be covering how to create a button operated gel dropper.
 
So without further ado, lets get to it.
 
 
 
== Step 1 ==
 
[[Image:Step01-02.PNG|thumb|right|150px|Basic Room]]
 
First, create a room of at least '''256 units deep''' and about '''512 wide'''. I also recommend at least '''384 high'''.
 
Texture the ceiling with one of the many <code>black_wall_metal</code> textures, and the floor with a <code>white_wall_tile</code> or <code>white_floor_tile</code> texture.
 
'''Important:''' You will need to add a light source. (Your paint will not work properly in mat_fullbright mode!)
 
At this point your room should look similar to the image above.
 
{{clr}}
 
 
 
== Step 2 ==
 
Next, create <code>prop_dynamic</code> entity and name it ''gel_dropper'', then set its '''World Model''' to <code>item_dropper.mdl</code>.
 
Set its '''Hold Animation''' property to '''Yes''', this will ensure that the animation does not loop.
 
To continue, position the dropper so that it sits flush against the ceiling.
 
{{clr}}
 
 
 
== Step 3 ==
 
[[Image:Step03-01.PNG|thumb|right|150px|Dropper]]
 
Now use the clipping tool to create a brush '''96 wide/deep''' directly above the dropper. Texture the bottom face <code>toolsblack_noportal</code>.
 
It should now look like this:
 
{{clr}}
 
 
 
== Step 4 ==
 
[[Image:Step04.PNG|thumb|right|150px|Inside]]
 
Next, create a <code>info_paint_sprayer</code> entity just below the ceiling and inside the dropper; name it ''gel_sprayer''. Make sure that it is facing down. At this point your paint dropper will be barely dripping, so therefore you may also want to set its '''Blobs per second''' property to about '''6+'''.
 
{{clr}}
 
 
 
== Step 5 ==
 
Now that we've set up the dropper we must now set up a trigger. You can use anything you like, but for simplicity I'm going to be using a button.
 
Create a <code>prop_button</code> entity and place it anywhere in your map, preferably near the dropper. Set its '''Delay Before Reset''' property to '''12''', then add these four outputs:
 
 
 
{| class=standard-table
 
!Output named || Target entities || Via this input || Parameter || Delay
 
 
|-
 
|-
|OnPressed || gel_dropper || SetAnimation || item_dropper_open || 0.00
+
| VMF Filename || instances/gameplay/paint_dropper.vmf
 
|-
 
|-
|OnPressed || gel_sprayer || Start || || 2.00
+
| $trigger_to_start || start_gel
 
|-
 
|-
|OnButtonReset || gel_sprayer || Stop || || 0.00
+
| $trigger_to_stop || stop_gel
 
|-
 
|-
|OnButtonReset || gel_dropper || SetAnimation || item_dropper_close || 2.00
+
| $paint_type || 0 = Bounce, 1 = Stick, 2 = Speed, 3 = Conversion, 4 = Water
 
|}
 
|}
{{clr}}
 
  
== Step 6 ==
+
If the cube dropper doesn't show up then save and reload so you can position it properly.
[[Image:Finished.PNG|thumb|right|150px|Finished! (With optionals)]]
 
Go to ''Map > Map Properties...'' and set '''Paint in map''' to '''Yes'''.
 
Finally, run your map! (''File > Run Map...'')
 
{{clr}}
 
  
== Step 7 - Polishing it ==
+
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:
{{note|This step is optional.}}
+
 
If your dropper is going to be published in a map you may also want to consider these tips.{{clr}}
+
::{| class=standard-table
'''1.''' Add a <code>toolsplayerclip</code> around the dropper to prevent the player from accidentally getting stuck inside it.{{clr}}
+
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
'''2.''' Create a <code>env_cubemap</code> inside the dropper to get proper reflections.
+
|-
{{clr}}
+
| [[Image:Io11.png]] || OnTrigger || gel_dropper || instance:@start_gel;Trigger || || 0.00 || No
 +
|}
  
== Conclusion ==
+
3. Hammer may indicate that this is invalid. Ignore it.
[[Image:Working.PNG|thumb|right|300px|In-Game]]
 
If you have pressed your button and everything functioned correctly, congratulations! You now know how to make paint droppers!
 
{{clr}}
 
  
== External links ==
+
===See Also===
*[http://forums.thinkingwithportals.com/downloads.php?view=detail&df_id=350 Example map] using all Gels. VMF included.
+
[[Dropper_(Portal_2)#List_Of_Instances|List of Dropper Instances]]
*[http://forums.thinkingwithportals.com/downloads.php?view=detail&df_id=402 Tutorial map] from the tutorial above. VMF only.
 
  
 
[[Category:Portal 2 Level Design]]
 
[[Category:Portal 2 Level Design]]
 
[[Category:Portal 2 Tutorials]]
 
[[Category:Portal 2 Tutorials]]

Revision as of 11:15, 15 May 2011

Русский
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. Water streams behave the same way gel does, but cleans gel off surfaces. Gel streams can be redirected with portals and funnels.

There are three types of gel, and water. 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.

Creating a Gel Dropper

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
$trigger_to_start start_gel
$trigger_to_stop stop_gel
$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 instance:@start_gel;Trigger 0.00 No

3. Hammer may indicate that this is invalid. Ignore it.

See Also

List of Dropper Instances