- Apr 14, 2011
- 129
- 144
I'm trying an experiment where shooting a brush causes its colour to change based on the type of damage and which team it is. So first I set up this:
The left block is a func_breakable with 9999 health. OnTakeDamage, it tells the upper-right block - an env_texturetoggle - to SetTextureIndex to 4 (value's not important other than it's different than 0, which is the red). The env_texturetoggle's target is the red block, which is a func_brush with a custom multi-frame texture (its .vmf being taken from here).
The first problem here is that the red block should be appearing white - red is index 0, but the default index is not 0, so it's supposed to start off as white. Also, when this setup is run in-game, nothing happens when the func_breakable is hit with any weapon. (I saw this topic but as I said this is an experiment to see if it can be done this way, and that method gets clunky rather quickly.)
Aside from these problems, is it even possible to filter damage by team? I know it's easy to filter it by type. Not too big a deal if you can't since this isn't anything serious.
The left block is a func_breakable with 9999 health. OnTakeDamage, it tells the upper-right block - an env_texturetoggle - to SetTextureIndex to 4 (value's not important other than it's different than 0, which is the red). The env_texturetoggle's target is the red block, which is a func_brush with a custom multi-frame texture (its .vmf being taken from here).
The first problem here is that the red block should be appearing white - red is index 0, but the default index is not 0, so it's supposed to start off as white. Also, when this setup is run in-game, nothing happens when the func_breakable is hit with any weapon. (I saw this topic but as I said this is an experiment to see if it can be done this way, and that method gets clunky rather quickly.)
Aside from these problems, is it even possible to filter damage by team? I know it's easy to filter it by type. Not too big a deal if you can't since this isn't anything serious.