Difference between revisions of "Creating indicator lights"

From Valve Developer Community
Jump to: navigation, search
(Overlays)
 
(23 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 +
{{back | Portal Level Creation}}
 +
 +
[[Image:Indicatorlights4.jpg|right|thumb|250px|Final product]]
 +
 
This tutorial will show you how to make those indicator strips on the ground and walls that change color when the trigger is activated. It assumes you have moderate knowledge on the [[Hammer Overlay Tool]].
 
This tutorial will show you how to make those indicator strips on the ground and walls that change color when the trigger is activated. It assumes you have moderate knowledge on the [[Hammer Overlay Tool]].
  
==Overlays==
+
== Overlays ==
  
 
[[Image:Indicatorlights1.jpg|right|thumb|info_overlays all laid out.]]
 
[[Image:Indicatorlights1.jpg|right|thumb|info_overlays all laid out.]]
Line 12: Line 16:
 
*<code>signage/indicator_lights/indicator_lights_corner_floor</code>
 
*<code>signage/indicator_lights/indicator_lights_corner_floor</code>
  
1. Create a path using the above [[info_overlay]]s from your trigger to whatever they should activate. Give them all the same name; in this example we will use '''button_lights'''.
+
# Create a path using the above <code>info_overlays</code> from your trigger to whatever they should activate. Give them all the same name; in this example we will use '''button_lights'''. The strips should all be 8 units wide and any length.
{{note|The overlays should be 8 units wide. Set the ''U End'' to '''length / 32'''.}}
+
 
 +
 
 +
For a straight length of lightstrip that is longer than the length of one strip (four circles), 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.  
 +
 
 +
When you first place a strip with the overlay tool, either '''U Start''' or '''U End''' will be ''1''. This is a multiplier for repeating the overlay - how many strips long the overlay will be. So if you change the value to ''2'', this will make the overlay have two lengths of strip, which effectively puts 8 circles into it. Note ''this does not change the length of the overlay'', and you have to ''stretch the overlay'' to fit the desired length of the strip so the circles are the correct aspect ratio.
 +
{{note|You can use decimal values to fine-tune the strip's length - for example, a '''U Start''' or '''U End''' of ''1.25'' will make the strip 5 circles long, and ''2.5'' will make the strip 10 circles long.}}
  
==Checkmark Box==
+
== Checkmark box ==
  
 
[[Image:Indicatorlights2.jpg|right|thumb|Where to put the frame.]]
 
[[Image:Indicatorlights2.jpg|right|thumb|Where to put the frame.]]
  
 
1. Create a [[prop_static]] with the following properties:
 
1. Create a [[prop_static]] with the following properties:
::{|
+
::{| class=standard-table
 
!  Property Name || Value
 
!  Property Name || Value
 
|-
 
|-
Line 27: Line 36:
 
Align it so it will be at the end of your light path.
 
Align it so it will be at the end of your light path.
 
[[Image:Indicatorlights3.jpg|right|thumb|Where to put the brush.]]
 
[[Image:Indicatorlights3.jpg|right|thumb|Where to put the brush.]]
2. Create a ''32Wx4Lx32H'' block brush textured with ''tools/toolsnodraw''. Texture the edges with ''signage/signage_border'' and the front with ''signage/signage_doorstate. Align this brush so it fits inside the [[prop_static]] sign frame.
+
2. Create a ''32Wx4Lx32H'' block brush textured with ''tools/toolsnodraw''. Texture the front with ''signage/signage_doorstate''. Align this brush so it fits inside the <code>prop_static</code> sign frame.
  
3. Tie the brush to a [[func_brush]] entity and give it the same name as your [[info_overlay]]s.
+
3. Tie the brush to a [[func_brush]] entity and give it the same name as your <code>info_overlay</code> entities.
 
{{clr}}
 
{{clr}}
  
Line 36: Line 45:
 
[[Image:Indicatorlights4.jpg|right|thumb|Final product]]
 
[[Image:Indicatorlights4.jpg|right|thumb|Final product]]
 
1. Create a [[env_texturetoggle]] entity somewhere near your overlays. Give it the following properties:
 
1. Create a [[env_texturetoggle]] entity somewhere near your overlays. Give it the following properties:
::{|
+
::{| class=standard-table
 
!  Property Name || Value
 
!  Property Name || Value
 
|-
 
|-
Line 45: Line 54:
  
 
2. Now just add the following output to the trigger for your button/switch/etc:
 
2. Now just add the following output to the trigger for your button/switch/etc:
::{|
+
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
 
|-
 
|-
| [[Image:Io11.png]] || (on trigger) || button_lights_toggle || SetTextureIndex || 1 || 0.00 || No
+
| [[Image:Io11.png]] || OnStartTouch || button_lights_toggle || SetTextureIndex || 1 || 0.00 || No
 
|-
 
|-
| [[Image:Io11.png]] || (off trigger) || button_lights_toggle || SetTextureIndex || 0 || 0.00 || No
+
| [[Image:Io11.png]] || OnEndTouchAll || button_lights_toggle || SetTextureIndex || 0 || 0.00 || No
 
|}
 
|}
  
You now have helpful indicator lights to put around your map! You can download the tutorial map [http://www.remmiz.com/portal/maps/indicatorlightstutorial.zip here].
+
You now have helpful indicator lights to put around your map!
  
==See also==
+
== See also ==
 +
* [[Portal Level Creation]]
  
*[[Portal Level Creation]]
+
== External links ==
 +
* [http://forums.thinkingwithportals.com/downloads.php?view=detail&df_id=182 Example map] Example map using this tutorial. VMF included.
  
 
[[Category:Level Design Tutorials]]
 
[[Category:Level Design Tutorials]]
 
[[Category:Portal]]
 
[[Category:Portal]]

Latest revision as of 10:05, 13 June 2019

Portal Level Creation
Final product

This tutorial will show you how to make those indicator strips on the ground and walls that change color when the trigger is activated. It assumes you have moderate knowledge on the Hammer Overlay Tool.

Overlays

info_overlays all laid out.

The bulk of the lights are comprised of info_overlays. The four textures used are:

  • signage/indicator_lights/indicator_lights_floor
  • signage/indicator_lights/indicator_lights_wall
  • signage/indicator_lights/indicator_lights_corner_wall
  • signage/indicator_lights/indicator_lights_corner_floor
  1. Create a path using the above info_overlays from your trigger to whatever they should activate. Give them all the same name; in this example we will use button_lights. The strips should all be 8 units wide and any length.


For a straight length of lightstrip that is longer than the length of one strip (four circles), 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.

When you first place a strip with the overlay tool, either U Start or U End will be 1. This is a multiplier for repeating the overlay - how many strips long the overlay will be. So if you change the value to 2, this will make the overlay have two lengths of strip, which effectively puts 8 circles into it. Note this does not change the length of the overlay, and you have to stretch the overlay to fit the desired length of the strip so the circles are the correct aspect ratio.

Note:You can use decimal values to fine-tune the strip's length - for example, a U Start or U End of 1.25 will make the strip 5 circles long, and 2.5 will make the strip 10 circles long.

Checkmark box

Where to put the frame.

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.

Where to put the brush.

2. Create a 32Wx4Lx32H block brush textured with tools/toolsnodraw. Texture the front with signage/signage_doorstate. Align this brush so it fits inside the prop_static sign frame.

3. Tie the brush to a func_brush entity and give it the same name as your info_overlay entities.

Making it Work

Final product

1. Create a env_texturetoggle entity somewhere near your overlays. Give it the following properties:

Property Name Value
Name button_lights_toggle
Target Brush(es) button_lights (or whatever you named the overlays/func_brush)

2. Now just add the following output to the trigger for your button/switch/etc:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouch button_lights_toggle SetTextureIndex 1 0.00 No
Io11.png OnEndTouchAll button_lights_toggle SetTextureIndex 0 0.00 No

You now have helpful indicator lights to put around your map!

See also

External links

  • Example map Example map using this tutorial. VMF included.