Indicator strips
From ThinkingWithPortals
Contents |
Introduction
This article assumes that you have basic knowledge of using brushes to create a map, and some knowledge of how input and output triggers work. (For example, the Door and Button Tutorial.) It also requires that you at least know how to place overlays into the level.
Before you actually get started
If you already have the basic layout for your map, ignore this section.
First we need to actually create a small map to which we will be using our indicator light strips in. To do this, you can simply create a brush that is approx. 1024, 512, 256 (Width, Length, Height) Then you want to carve it out, preferably -16 but again, none of this truly effects the indicator lights. Texture it as you please, as indicator lights will work on any surface. Then create a player start on the opposite side of our little hallway as where we want our indicator strips to reside.
That's all you need to do to get yourself ready for indicator strips.
Getting Started
If you are here for the tutorial but skipped the first section because you had basic map skills, here is where you want to start paying attention.
Please note that this tutorial will not go over creating a door or switch, an article for this already exists. We will be toggling indicator strips through using a simple trigger_multiple.
Now that you have a basic layout as to which you want to place your indicator strips, you more than likely also have a good assumption as to where you want them, where they are going from and where they are going to. If not, then you should stare blankly at your map until you find out, because I can't force it on you.
The basic idea behind indicator strips:
When you're making indicator strips, you're only placing down overlays like the ones you might use for hint signs or to add some detail (puke) to the levels floors, walls or ceilings. Then you are creating a special entity that will toggle the material (which is built in to the specific texture file) on the overlay, to signal itself as triggered or not. This tutorial will take you through the process of doing all of this, while explaining why and how it all works.
Placing the overlays:
Indicator strips have 5 textures:
| Discription | Path/Name |
|---|---|
| Floor | signage/indicator_lights/indicator_lights_floor |
| Floor corners | signage/indicator_lights/indicator_lights_corner_floor |
| Wall | signage/indicator_lights/indicator_lights_wall |
| Wall corners | signage/indicator_lights/indicator_lights_corner_wall |
| X or Check Sign | signage/signage_doorstate |
Place your sign on a specific brush 32 by 32 and the texture shift at 64, -32. Then tie the brush to a func_brush
It's completely up to you to place in each indicator strip, theres no magical method of making sure they're perfect except for grid snap and a little elbow grease.
Resizing Overlays
When placing your overlays, it might be useful to mention that you do not need to place multiple overlays over a straight line. Instead, go into the overlay properties and change the U/V Start/End value. By default, this is 1. This means that the texture will repeat itself 1 time, and that 1 texture will be stretched accordingly.
The best tip I can offer for knowing what to place in this box without distorting the texture is, count how many strips you'll need to cover the distance between point A and point B, knowing that each strip has 4 circles, and each circle is 16 by 16 big, this is your whole number. Now if you don't have room to fit a full strip in, then just type in a fraction. Take the number if circles you can fit, divided by the number of circles in a single strip which is 4. Add this on to your whole number.
In the example shown to the right, we have a strip that is only 3 circles wide. 3 divided by 4 is 0.75, so this texture's U/V is set to 0.75, and as long as the strip itself is resized to the correct length, you should not notice any stretch marks.
Setting up strips to react to input
Once you have your indicator strips in place, we can start setting them up to actually make them work, but before we can make them actually work, we are going to need a method of triggering them. For the sake of simplicity we are just going to use a trigger_multiple which will toggle the indicator strips based on whether the player is standing in our trigger or not.
Creating the trigger:
First we are going to create a brush on the opposite side of the hallway as the player, then tie it to a trigger_multiple. Size really doesn't matter, but to be sure that the player is forced to stand in it, you should make it big and unable to be passed. (Remember, portals can pass triggers.)
Within this trigger_multiple, make sure that its flags are set to only client. This will make sure that it reacts to the player and only the player, as opposed to things such as physical objects like the weighted companion cube or a radio.
Setting up texture control:
Now we need to create a env_texturetoggle which is going to serve as a control point for all of our overlays. You'll need one of these for each set of overlays. This means that if you want to have one button and a door, you'll need one env_texturetoggle. If you want to have two buttons and doors, you'll need two env_texturetoggle. Indicator strips aren't limited to buttons and doors, but it's the most simple form of triggers, so I'm going to use them for an example.
Now within the env_texturetoggle we have 2 values we can work with.
- Name: This is the name of the env_texturetoggle, we need this so we can call it with the output of our trigger_multiple.
- Target Brush(es): This is the name that's going to link with our indicator strip overlays. You should type something like: DoorSwtich_1 or something of that sort. Just remember this name, so we can put it in our overlays.
Setting up our overlays:
Now that we've got our env_texturetoggle set up, we need to actually teach our overlays how to listen to it.
Select all of your overlays (control to select more then one), don't worry about our sign yet. You also don't need to worry about selecting more than one kind of overlay, even though they will have (different) values, the only value we're interested in changing is the Name value.
Under name, type the exact same thing you put in the env_texturetoggle. Don't worry if it gets bold, this just means there is more than 1 entity being given that name, which is exactly what we want in this case.
Now we need to select our sign brush and tie it to a func_brush if you haven't done so already.
Select the brush and in its properties, then change it's name to the same thing in the overlays.
Making them work!
Now that our indicator strips are set up to react to input given to them, we actually need to give them that input by creating output from our trigger_multiple.
Output/Input of Trigger
Select our trigger_multiple and go to the Outputs tab. Now we need to create the fallowing Outputs:
- My output named: OnStartTouch
- Target Entities named: IndicatorToggle_1 (Replace this with the name of your env_texturetoggle)
- Via this input: SetTextureIndex
- With a parameter override of: 1
This is going to make it so that when you touch the env_texturetoggle then the "TextureIndex" of our env_texturetoggle will change from 0 to 1, which changes all of our overlays from blue to orange.
- My output named: OnEndTouch
- Target Entities named: IndicatorToggle_1 (Replace this with the name of your env_texturetoggle)
- Via this input: SetTextureIndex
- With a parameter override of: 0
This is going to make it so that when you stop touching the env_texturetoggle then the "TextureIndex" of our env_texturetoggle will change from it's initial 1, back to 0, which will change all of our overlays from orange, back to blue.

