toggling textures on a brush

Like such as the NIPPER
Post Reply
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

toggling textures on a brush

Post by ehlohel » Wed May 25, 2011 6:33 pm

i want to know if there is some way to make a brush that, when a trigger is touched, the floor texture changes, and OnNotTouching, it reverts back to its original texture. saw something like this on a different map (I think by AlphaKennyOne). i'd rather not use doors or anything like that.

I want to know because I'm creating an abstract map and i want a hallway that has a piano floor, when you walk over it it changes the texture slightly (darkens it on all the edges but not the middle, I have this texture created as well). there will also be an audible change in pitch with whatever sound i use as you go up the keyboard.
Image
User avatar
Wolsk
Im hungry, i need a fur burger
<font color=blue>Im hungry, i need a fur burger</font>
Posts: 9910
Joined: Wed Aug 20, 2008 4:22 pm
Location: under your bed

Re: toggling textures on a brush

Post by Wolsk » Wed May 25, 2011 6:39 pm

Yeah, I made a map that uses this, and I actually happen to have a DEV sitting around I believe.
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

Re: toggling textures on a brush

Post by ehlohel » Wed May 25, 2011 6:52 pm

cool, can you tell me how?
Image
User avatar
Wolsk
Im hungry, i need a fur burger
<font color=blue>Im hungry, i need a fur burger</font>
Posts: 9910
Joined: Wed Aug 20, 2008 4:22 pm
Location: under your bed

Re: toggling textures on a brush

Post by Wolsk » Wed May 25, 2011 7:01 pm

I can send you the DEV (or if I don't have it I can make one for you).
I don't exactly remember how to do it, but I have a map that can do it.
It switches between a block being invisible to appearing.
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

Re: toggling textures on a brush

Post by ehlohel » Wed May 25, 2011 7:22 pm

awwww, i was hoping i could just toggle the texture or something. good enough, anyway. i'd much rather you just post here how to do it, if that's okay. thanks for the help.
Image
User avatar
Wolsk
Im hungry, i need a fur burger
<font color=blue>Im hungry, i need a fur burger</font>
Posts: 9910
Joined: Wed Aug 20, 2008 4:22 pm
Location: under your bed

Re: toggling textures on a brush

Post by Wolsk » Wed May 25, 2011 7:38 pm

You can toggle the texture if you want.
That's all that mine is actually...
It's an invisible texture and a visible one.
You can do two visible ones if you want.
And I can take some screenshots to help out.
I don't really remember what I did... :/
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

Re: toggling textures on a brush

Post by ehlohel » Wed May 25, 2011 7:52 pm

screenshots would be nice but you didn't tell me HOW to toggle them, which is really what i was looking for.

still, thanks
Image
User avatar
Wolsk
Im hungry, i need a fur burger
<font color=blue>Im hungry, i need a fur burger</font>
Posts: 9910
Joined: Wed Aug 20, 2008 4:22 pm
Location: under your bed

Re: toggling textures on a brush

Post by Wolsk » Wed May 25, 2011 7:54 pm

Well, I'll post screenshots of the inputs and outputs and stuff.
I'm just currently re-installing SDK after having to uninstall Steam...
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

Re: toggling textures on a brush

Post by ehlohel » Wed May 25, 2011 8:04 pm

Wolsk wrote:Well, I'll post screenshots of the inputs and outputs and stuff.
I'm just currently re-installing SDK after having to uninstall Steam...
see? world history IS important
Image
User avatar
MrBlip
It was inevitable.
Posts: 6918
Joined: Fri Jan 28, 2005 9:55 pm
Location: Narshe

Re: toggling textures on a brush

Post by MrBlip » Wed May 25, 2011 8:14 pm

It's been a while but....

Two func_brushes. One func_brush (tex1) with the first texture, another (tex2) with the second texture. Overlap them.

trigger_multiple:
OnStartTouch
>tex1 disable (or off/toggle)
>tex2 enable (or on/toggle)
OnEndTouchAll
>tex1 enable
>tex2 disable

An alternative (and I think better) method would be to have the piano keys on one big solid brush and make a series of func_brushes for each of the keys. The func brushes would be one unit thick right above the piano keys, completely nodrawed except for the top, which will be the darkened texture. In this case, you would want to make the texture be more of a decal or an overlay, in that it adds the shadow to the piano keys rather than completely replacing it.

It'll be the same as the other method, just without disabling the original texture and fewer func_brushes.
Last edited by MrBlip on Wed May 25, 2011 8:19 pm, edited 1 time in total.
9:18 PM - mrblip: im allowed to have my own opinions
9:19 PM - Dr. Doctorpus: no youre not
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

Re: toggling textures on a brush

Post by ehlohel » Wed May 25, 2011 8:18 pm

thank you, mr blip.

you too, wolsk.
Image
User avatar
MrBlip
It was inevitable.
Posts: 6918
Joined: Fri Jan 28, 2005 9:55 pm
Location: Narshe

Re: toggling textures on a brush

Post by MrBlip » Wed May 25, 2011 8:19 pm

I edited my post - take a look at the alternative.
9:18 PM - mrblip: im allowed to have my own opinions
9:19 PM - Dr. Doctorpus: no youre not
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

Re: toggling textures on a brush

Post by ehlohel » Wed May 25, 2011 8:36 pm

thanks a lot, but i won't be able to tell you if it works or not for a while. kind of a ways from making a compile as of yet.
Image
User avatar
Wolsk
Im hungry, i need a fur burger
<font color=blue>Im hungry, i need a fur burger</font>
Posts: 9910
Joined: Wed Aug 20, 2008 4:22 pm
Location: under your bed

Re: toggling textures on a brush

Post by Wolsk » Wed May 25, 2011 9:14 pm

FFFFFFFFUUUUUUUUUUUUUUUU-
I just finished the DEV thing. ):
User avatar
ehlohel
that's why they call me Mr. Fahrenheit
<b><i>that's why they call me Mr. Fahrenheit</i></b>
Posts: 836
Joined: Sun Nov 22, 2009 4:24 pm
Location: arghhh

Re: toggling textures on a brush

Post by ehlohel » Wed May 25, 2011 9:26 pm

why don't you upload it and leave it here in case someone has the same question and stumbles upon this?
Image
Post Reply