Making Switchable Textures Created 19 years ago2005-06-13 13:37:38 UTC by Elon Yariv Elon Yariv

Created 19 years ago2005-06-13 13:37:38 UTC by Elon Yariv Elon Yariv

Posted 19 years ago2005-06-13 13:37:38 UTC Post #114160
I want to make a switchable texture!! If I'll name it like this- +0~SCREEN -will it will be switchable ingame? :zonked: (I have another texture that is going to be off) If it will work then it's easy to make special textures! :nuts:

How do I choose which color of light the texture will emmit and how bright the light will be? :confused:
Posted 19 years ago2005-06-13 13:57:35 UTC Post #114161
Dont we have a tutorial on making light emitting textures? And arn't there thousands of them on every HL modding site?
Posted 19 years ago2005-06-13 14:01:00 UTC Post #114164
Not sure but I know that in the costum textures tutorial atom only explains how to include the wad files!!! :x
Posted 19 years ago2005-06-13 14:04:32 UTC Post #114167
No, there is no tutorial in this site on this!! :lol:
Posted 19 years ago2005-06-13 15:14:50 UTC Post #114184
Yes there is. It's called, appropriately, Texture Lighting. It's also covered in Light.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-06-13 17:34:37 UTC Post #114221
Realy, thanks!! :o
Posted 19 years ago2005-06-13 17:50:23 UTC Post #114225
And the switchable texture? : (which is more importent)
Posted 19 years ago2005-06-13 17:54:38 UTC Post #114226
Hehehe...as for the texlight I should have searched in the biginer section!!!
Posted 19 years ago2005-06-13 18:12:43 UTC Post #114231
I still can't figure that tex light thing out. I think I just don't have the brain capacity.
Posted 19 years ago2005-06-13 20:48:35 UTC Post #114235
There are a million tutorials on switchable textures.

Textlights are really simple. Simpy edit your lights.rad file, which lives in the same place as your ZHLT tools.

GENERIC88A 255 100 100 1000

The first column is the texture name, second column contains color and brightness information.

The first 3 subcolumns are the color of the light to be emitted from your texture. I use MS paint to pick a color, and then transcribe the numbers, but you can use just about anything--including a normal light entity in hammer--, to do the same.

Then all that's left is the brightness. I would recommend starting with a low number--50-100--to start, and then work up to the desired brightness.

And that's it. Simple as pie. :)
Posted 19 years ago2005-06-14 03:59:37 UTC Post #114269
Yes, I know about the texlight but can you direct me to a tutorial thet explains how to create switchable textures!!! :
Posted 19 years ago2005-06-14 05:27:09 UTC Post #114285
Have you ever tried looking at the textures in Wc? Thier named like this: +0~acs0 and +0~acs1 (these are two examples!!!)! So, your first texture was named +0~Screen, try to make a new one called +1~Screen (Im not sure if this will work cuz I dont know anything 'bout Switchable Textures myself :D )
Posted 19 years ago2005-06-14 05:41:57 UTC Post #114290
The one that is off is seposed to be called like that +A~SCREEN :lol: and I just want to be sure that I know how to make it switchable!!! Do I just need to give two textures identical names and before those names write +0 or +A? Or is it more complucated? :
Posted 19 years ago2005-06-14 05:44:51 UTC Post #114291
The new ZHLT (http://www.zhlt.tk allow you to add a style to any brush based entity with a texture light on any side(s)

Here's how it works:

Set a style of lighting for the texlight. Can be applied to any brush based entity.

Available styles are:

0 : "Normal"
-3 : "Grouped"
10 : "Fluorescent flicker"
2 : "Slow, strong pulse"
11 : "Slow pulse, noblack"
5 : "Gentle pulse"
1 : "Flicker A"
6 : "Flicker B"
3 : "Candle A"
7 : "Candle B"
8 : "Candle C"
4 : "Fast strobe"
9 : "Slow strobe"
12 : "Underwater"
The Grouped setting is essentially a hack to allow your texlights to be switchable. To use it, create a brush entity with texlights on it, and set its style to Grouped; then create a light entity with the same name as the brush entity. Hlrad will now pretend that the light emitted by the texlight is "really" being emitted by your light entity. In other words, turning the light on and off will now turn the texlights on and off, too.

You'll probably want to set the brightness of the light entity to 0.01, so that it emits no light of its own (this trick is unnecessary if you're using Spirit of Half-Life, which supports switchable texlights directly).
Posted 19 years ago2005-06-14 05:55:36 UTC Post #114294
I have no problem with changing Lights.RAD but the must texture change or else it will look stupid! :roll: And I know I can do it with Func_walltoggle but I already have the textures and all I need is to make them switchable!!! :x
Posted 19 years ago2005-06-14 07:34:28 UTC Post #114328
Read my post and try that. :)
Posted 19 years ago2005-06-14 08:41:29 UTC Post #114338
User posted image
[b]+0~SCREEN[/b]
User posted image
[b]+A~SCREEN[/b]
You meen that if I'll use your metaod and trigger the func_wall it will change its texture,+0~SCREEN, into the +A~SCREEN texture!?! If it changes its texture then is it because of the texture's name? :
Posted 19 years ago2005-06-14 09:06:27 UTC Post #114347
Why didn't you try it instead of posting?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-06-14 09:12:15 UTC Post #114349
I don't want to crash Hl1 or something like that!
Posted 19 years ago2005-06-14 09:22:07 UTC Post #114352
Do you want those textures to emit light?

+0~SCREEN orange-ish color
+A~SCREEN light grey-ish color

And when those texture switch, you also want the light to switch? From grey to orange and vice versa?
Posted 19 years ago2005-06-14 10:05:52 UTC Post #114359
Yes, only that +A~SCREEN emmits no light!! They did it already with many texlights!!!
Posted 19 years ago2005-06-14 10:29:37 UTC Post #114363
I don't want to crash Hl1 or something like that!
Biggest chicken I ever heard of :P
Posted 19 years ago2005-06-14 11:27:03 UTC Post #114382
Rofl.

Anyway: add

Just place a light entity in front of the orange screen and trigger both the brush (func_wall) and the light goes off when switched to the grey screen.
Posted 19 years ago2005-06-14 13:58:15 UTC Post #114422
oh, You're so Creative, env_muzzleflash
Posted 19 years ago2005-06-15 04:54:43 UTC Post #114507
Ok, i did some testing and i got it. Here you go, elon:

First, rename your "on" texture to +0~SCREEN_EY and the "off" texture to +A~SCREEN_EY. Then add these in a new or existing wad file.
Then openup your lights.rad/valve.rad file and add this line:

+0~SCREEN_EY 230 85 0 1200

Now go into Hammer and make a brush with your "on" texture on it. Turn this brush into a func_wall and name it screen_light. Then go the Style option and select Grouped. If you don't see the Style option, turn off smart-edit and add a new key and value:

key: style
value: -3

Next, place a light entity anywhere near and name it the same as your brush, in this case: screen_light. Set its color and brightness to 255 255 255 0.01, so that it won't emit any light of its own.

Now make a func_button and let it target the brush (screen_light). Goto its flags and check Don't move and Toggled.

Thats it, save and compile this map with the ZHLT 3.0 or higher. 3.2 is out, so use that one. Don't use older tools.

If you use the button ingame, the screen texture goes to its off version and the orange light dissapears. If you use button again, the screen texture goes back to its on version and the orange light reappears.

If you can't figure this out, i got an example map and everything ready for you. :)
Posted 19 years ago2005-06-15 07:36:43 UTC Post #114536
Thanks, muzzleflash!!

And I use zhlt 3.2 :lol:
Posted 19 years ago2005-06-15 10:02:09 UTC Post #114553
Man it's annoying! Why do I have to use this light entity!?! :confused: If I'll use regular half-life texlight that are swtchable then I wont need to do it! There have to be a way to make it work like in the half-life textures!! :
Posted 19 years ago2005-06-15 10:15:48 UTC Post #114555
Are there actually switchable half-life textures?? which are those?
I thought that switchable lights were made with a point light entity and using the "turned off" textures that most of the lights have.
Posted 19 years ago2005-06-15 10:52:19 UTC Post #114556
?

Does it still work without the light entity?
Posted 19 years ago2005-06-15 12:28:10 UTC Post #114571
No, when the texture changes the light stays!! :
Posted 19 years ago2005-06-15 12:47:43 UTC Post #114576
Well there you go, you NEED the light entity.

And again:

The Grouped setting is essentially a hack to allow your texlights to be switchable. To use it, create a brush entity with texlights on it, and set its style to Grouped; then create a light entity with the same name as the brush entity. Hlrad will now pretend that the light emitted by the texlight is "really" being emitted by your light entity. In other words, turning the light on and off will now turn the texlights on and off, too.
Posted 19 years ago2005-06-15 12:58:22 UTC Post #114579
No it's not, to be able to switch a texture you just need a +0 texture and a +A texture!!! :lol:
Posted 19 years ago2005-06-15 13:06:26 UTC Post #114580
He's talking about switching the light from it!
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2005-06-15 13:08:12 UTC Post #114582
Ohhh...I get it!!!
Posted 19 years ago2005-06-15 13:12:39 UTC Post #114583
After I typed the style value in the func_wall I chacked for problems and it said that it's an unused key!! :zonked:
Posted 19 years ago2005-06-15 13:29:02 UTC Post #114588
Tried the thingy with the light but it didn't work! :zonked: (I didn't do the grouped thingy cause of the problem)
Posted 19 years ago2005-06-15 14:10:53 UTC Post #114592
Just ignore the unused key. Its because Styles are not in your fgd file.

And you must set the Style to Grouped (-3) or else ?t won't work.
Posted 19 years ago2005-06-15 14:37:03 UTC Post #114604
Did everything you told me to but it didn't work so could you post an example? :
Posted 19 years ago2005-06-15 15:44:35 UTC Post #114634
There is one here already by BJ, called, amazingly:

Switchalable Textlights

I'm not sure if it's the same as Muzzle's method, because I've not tried it.
Posted 19 years ago2005-06-15 15:51:01 UTC Post #114635
I know how to switch texlight but with my texlights it's diffrent!! :
Posted 19 years ago2005-06-15 15:54:28 UTC Post #114637
Rowleybob, thats an example that uses a different way of making switchable texture lights.

I got the example at work, so ill upload it at the vault tomorrow. :)
Posted 19 years ago2005-06-15 15:55:00 UTC Post #114638
Elon: you should actually look at the example map then. This is what your looking for.

Muzzle: looking forward to your example.
Posted 19 years ago2005-06-16 03:38:48 UTC Post #114725
Posted 19 years ago2005-06-16 09:29:32 UTC Post #114778
Thanks helped to insert another detail in the map!!! Sorry I didn't knew it's going to be so complicated but once when I created a switchable texlight with those tnnl lights I didn't need all these stuff! :
Posted 19 years ago2005-06-16 09:41:46 UTC Post #114785
Nope, this only applies at custom texture lights. :)
Posted 19 years ago2005-06-16 16:53:31 UTC Post #114876
Great example! Texture lighting looks soooo much better that point-based, and what a nice, easy way to make them switchable!
You must be logged in to post a response.