Indicator Lights (Portal 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (I'm working on it! Again. For people who don't know how. And for fun)
(still writing this)
Line 1: Line 1:
{{wip}}
 
[[File:Indiclights 1.png|right|130px]]
[[File:Indiclights 1.png|right|140px]]
'''Indicator Lights''' are lines of small lights that are present in test chambers to indicate the interaction between two or more entities in the map, typically between a button and another entity in the world.
'''Indicator Lights''' are lines of small lights that are present in test chambers to indicate the interaction between two or more entities in the map, typically between a button and another entity in the world.
The typical usage of the lights are the lights being blue when inactive, and orange when active.
The typical usage of the lights is the lights being blue when inactive, and orange when active.


== How to make Indicator Lights ==
== How to make Indicator Lights ==
This tutorial assumes basic knowledge of [[Hammer]].  
This tutorial assumes basic knowledge of [[Hammer]].  
=== Step 1 ===
=== Step 1 ===
In your map, create two entities you want to interact with each other. These could varied from a [[Button (Portal 2)#Floor Button|Heavy Duty Super-Colliding Super-Button]] opening a simple exit [[Test Door (Portal 2)|door]], to a [[Button (Portal 2)#Button|button]] that will temporarily interact with a [[Diversity Vent]] which will deliver [[Gel (Portal 2)|gel]] to bounce on one step closer to the solution. Whatever you decide to do is up to you, but always next to the '''activator''' place an [[env_texturetoggle]] entity - this will help us change the indicator colors further in the tutorial and help you remember were you place your entities, resulting in a cleaner map.
In your map, create two entities you want to interact with each other. These could vary from a [[Button (Portal 2)#Floor Button|Heavy Duty Super-Colliding Super-Button]] opening a simple exit [[Test Door (Portal 2)|door]], to a [[Button (Portal 2)#Button|button]] that will temporarily interact with a [[Diversity Vent]] which will deliver [[Gel (Portal 2)|gel]] bringing the player one step closer to the solution. Whatever you decide to do is up to you, but always next to the '''activator''' place an [[env_texturetoggle]] entity - this will help us change the indicator colors further in the tutorial and help you remember were you place your entities, resulting in a cleaner map.


=== Step 2 ===
=== Step 2 ===
Select a texture for the lights in the texture browser, for this tutorial use "signage/indicator_lights/indicator_lights_floor" (Easily found by typing "indicator" in the filter bar).
Select a texture for the lights in the texture browser, for this tutorial use "signage/indicator_lights/indicator_lights_floor" (Easily found by typing "indicator" in the filter bar).
*<code>signage/indicator_lights/indicator_lights_floor</code>
 
*<code>signage/indicator_lights/indicator_lights_wall</code>
A1. <code>signage/indicator_lights/indicator_lights_floor</code>
*<code>signage/indicator_lights/indicator_lights_corner_wall</code>
<br>A2. <code>signage/indicator_lights/indicator_lights_wall</code>
*<code>signage/indicator_lights/indicator_lights_corner_floor</code>
<br>B1. <code>signage/indicator_lights/indicator_lights_corner_wall</code>
*<code>signage/indicator_lights/indicator_neon_straight</code>
<br>B2. <code>signage/indicator_lights/indicator_lights_corner_floor</code>
{{Note|The textures in each pair of overlays are functionally and cosmetically indistinguishable; but you can still use both overlays if desired.}}
 
=== Step 3 ===
=== Step 3 ===
Select the [[Hammer_Overlay_Tool|Overlay]] option in hammer, and place your lights overlays as desired. Functionally it doesn't matter how they're placed, though a logical line between the entities interacting is desired, usually the shortest way between the two entities; don't forget the shortest way could travel on walls at some point. Also, to keep consistent with Valve's approach to these lights, when the line turns a <code>signage/indicator_lights/indicator_lights_corner_wall</code> should be in the corner, thus his name came to be.
Select the [[Hammer_Overlay_Tool|Overlay]] option in hammer, and place your lights overlays as desired. Functionally it doesn't matter how they're placed, though a logical line between the entities interacting is desired, usually the shortest way between the two entities; don't forget the shortest way could travel on walls at some point. Also, to keep consistent with Valve's approach to these lights, when the line turns a <code>signage/indicator_lights/indicator_lights_corner_wall</code> should be in the corner, thus his name came to be.
Line 21: Line 23:
The length of one strip is four circles, however sometimes you might want to have fewer overlays to keep your map clean. Luckily you can adjust the overlay properties to make it longer rather than make duplicates of the strip. This is accomplished by editing the '''U Start''' or '''U End''' keyvalue in the properties window for the overlay. Another way of accomplishing this is to stretch 'physically' the overlay in one of the '''2D views''' - make sure that the 'Texture Lock' is unchecked.  
The length of one strip is four circles, however sometimes you might want to have fewer overlays to keep your map clean. Luckily you can adjust the overlay properties to make it longer rather than make duplicates of the strip. This is accomplished by editing the '''U Start''' or '''U End''' keyvalue in the properties window for the overlay. Another way of accomplishing this is to stretch 'physically' the overlay in one of the '''2D views''' - make sure that the 'Texture Lock' is unchecked.  
{{tip|Remember that you can add decimal key values to the strips length. This is helpful if you want a strip of 5 circles, for example, which would be possible if you set the strip's length to 1.25 (each circle is 0.25). So if you want a strip of 11 circles, the strip's length would be 2.75.}}
{{tip|Remember that you can add decimal key values to the strips length. This is helpful if you want a strip of 5 circles, for example, which would be possible if you set the strip's length to 1.25 (each circle is 0.25). So if you want a strip of 11 circles, the strip's length would be 2.75.}}
{{Note|Each pair of overlays are functionally and cosmetically indistinguishable, but you can still use overlays with different textures if desired.}}


=== Step 4 ===
=== Step 4 ===
Line 43: Line 44:


== Checkmark Box ==
== Checkmark Box ==
[[Image:Indicator checkbox placement.jpg|right|thumb|Where to put the '''prop_indicator_panel'''.]]
A '''checkmark box''' is a binary indicator, meaning it only has off and on states. It is used to indicate the operated entity 'active state'.


[[Image:Indicator checkbox placement.jpg|right|thumb|Where to put the '''prop_indicator_panel'''.]]
=== Step 1 ===
=== Step 1 ===
Create a [[prop_static]] with the following properties:
Create a [[prop_static]] with the following properties:
Line 68: Line 70:
|}
|}


{{Note|If you decide to fill the 'Indicator Lights' field in the prop_indicator_panel's properties, the prop_indicator_panel will act as an env_texturetoggle. So when it is "Checked" or Unchecked" it will change the "skin" of the indicator light path you attached to it.}}
=== Step 4 ===
=== Step 4 ===
Add to the activator entity another two outputs:
Add to the activator entity another two outputs:
Line 83: Line 86:


== Checkmark Timer ==
== Checkmark Timer ==
{{todo|need to be done}}
A '''checkmark timer''' acts almost as the checkmark box: showing the active state of the operated entity. However, it shows that the operation will last a limited amount of time. It is usually advised that the activator would be a simple [[Button (Portal 2)#Button|button]] because when activating a [[Button (Portal 2)#Floor Button|floor button]] the player expects the operation to be permanent until he steps off the button.
 
=== Step 1 ===
Again, place a prop_static with the following properties:
::{| class=standard-table
!  Property Name || Value
|-
| World Model || models/props/sign_frame01/sign_frame01.mdl
|}
Align it so it will be at the end of your light path.
 
=== Step 2 ===
Place a prop_indicator_panel at the exact same spot as the <code>sign_frame01.mdl</code> and add the following properties:
::{| class=standard-table
!  Property Name || Value
|-
| Name || checktime_indlights_1
|-
| Indicator Lights || indlights_1
|}
== Old Aperture Indicator Lights ==
== Old Aperture Indicator Lights ==
{{todo|they're a bit different than the normal lights...}}
{{todo|they're a bit different than the normal lights...}}
*<code>signage/indicator_lights/indicator_neon_straight</code>
[[Category:Portal 2 Level Design]]
[[Category:Portal 2 Level Design]]

Revision as of 00:31, 15 August 2011

Indiclights 1.png

Indicator Lights are lines of small lights that are present in test chambers to indicate the interaction between two or more entities in the map, typically between a button and another entity in the world. The typical usage of the lights is the lights being blue when inactive, and orange when active.

How to make Indicator Lights

This tutorial assumes basic knowledge of Hammer.

Step 1

In your map, create two entities you want to interact with each other. These could vary from a Heavy Duty Super-Colliding Super-Button opening a simple exit door, to a button that will temporarily interact with a Diversity Vent which will deliver gel bringing the player one step closer to the solution. Whatever you decide to do is up to you, but always next to the activator place an env_texturetoggle entity - this will help us change the indicator colors further in the tutorial and help you remember were you place your entities, resulting in a cleaner map.

Step 2

Select a texture for the lights in the texture browser, for this tutorial use "signage/indicator_lights/indicator_lights_floor" (Easily found by typing "indicator" in the filter bar).

A1. signage/indicator_lights/indicator_lights_floor
A2. signage/indicator_lights/indicator_lights_wall
B1. signage/indicator_lights/indicator_lights_corner_wall
B2. signage/indicator_lights/indicator_lights_corner_floor

Note.pngNote:The textures in each pair of overlays are functionally and cosmetically indistinguishable; but you can still use both overlays if desired.

Step 3

Select the Overlay option in hammer, and place your lights overlays as desired. Functionally it doesn't matter how they're placed, though a logical line between the entities interacting is desired, usually the shortest way between the two entities; don't forget the shortest way could travel on walls at some point. Also, to keep consistent with Valve's approach to these lights, when the line turns a signage/indicator_lights/indicator_lights_corner_wall should be in the corner, thus his name came to be.

The length of one strip is four circles, however sometimes you might want to have fewer overlays to keep your map clean. Luckily you can adjust the overlay properties to make it longer rather than make duplicates of the strip. This is accomplished by editing the U Start or U End keyvalue in the properties window for the overlay. Another way of accomplishing this is to stretch 'physically' the overlay in one of the 2D views - make sure that the 'Texture Lock' is unchecked.

Tip.pngTip:Remember that you can add decimal key values to the strips length. This is helpful if you want a strip of 5 circles, for example, which would be possible if you set the strip's length to 1.25 (each circle is 0.25). So if you want a strip of 11 circles, the strip's length would be 2.75.

Step 4

Select the overlays you just placed (and ONLY the overlays you want) and name them all the same. Use "indlights_1" for this tutorial. Then open up the env_texturetoggle you previously placed, and enter the same name into the Target Brush(es) field. Now name the env_texturetoggle "texturetoggle_lights_01"

Step 5

Select the activator entity, and go to the outputs menu. In this tutorial a simple button entity was used, so all output parameters in the table would relate to it. All you need to do is to add these two outputs to your activator:

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed texturetoggle_lights_01 SetTextureIndex 1 0.00 No
Io11.png OnButtonReset texturetoggle_lights_01 SetTextureIndex 0 0.00 No
 

So basically, now when the button is pressed the texturetoggle_lights_01 will change the overlays connected to it to the alternate "skin" of their's - the appropriate orange texture. After that when the button will reset the "skin" would return to the normal color - blue.

Done, your indicator lights should now be working!

Checkmark Box

Where to put the prop_indicator_panel.

A checkmark box is a binary indicator, meaning it only has off and on states. It is used to indicate the operated entity 'active state'.

Step 1

Create a prop_static with the following properties:

Property Name Value
World Model models/props/sign_frame01/sign_frame01.mdl

Align it so it will be at the end of your light path.

Step 2

At the exact same spot, with the exact same "Pitch Yaw roll" place a prop_indicator_panel. The best way to do this is to shift-drag the prop_static to the same place by moving it a unit to one direction and returning it.

Note.pngNote:Do not be fooled by the prop_indicator_panel's appearance; in-game it is only drawn as the checkmark-box. This is why the models/props/sign_frame01/sign_frame01.mdl is needed as well.

Step 3

Fill the prop_indicator_panel's fields as desired. Give the entity a name, and make sure it is linked to the overlay not the env_texturetoggle.

Property Name Value
Name checkmark_indlights_1
Indicator Lights indlights_1
Note.pngNote:If you decide to fill the 'Indicator Lights' field in the prop_indicator_panel's properties, the prop_indicator_panel will act as an env_texturetoggle. So when it is "Checked" or Unchecked" it will change the "skin" of the indicator light path you attached to it.

Step 4

Add to the activator entity another two outputs:

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed checkmark_indlights_1 Check   0.00 No
Io11.png OnButtonReset checkmark_indlights_1 Uncheck   0.00 No
 

So now you have an operating checkmark box as well, don't forget to link the activator to the activated entity too.

Checkmark Timer

A checkmark timer acts almost as the checkmark box: showing the active state of the operated entity. However, it shows that the operation will last a limited amount of time. It is usually advised that the activator would be a simple button because when activating a floor button the player expects the operation to be permanent until he steps off the button.

Step 1

Again, place a prop_static with the following properties:

Property Name Value
World Model models/props/sign_frame01/sign_frame01.mdl

Align it so it will be at the end of your light path.

Step 2

Place a prop_indicator_panel at the exact same spot as the sign_frame01.mdl and add the following properties:

Property Name Value
Name checktime_indlights_1
Indicator Lights indlights_1

Old Aperture Indicator Lights

Todo: they're a bit different than the normal lights...
  • signage/indicator_lights/indicator_neon_straight