Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

Making one-way glass

Discussion in Mapping Discussion started by CCHR, Oct 22, 2013

  1. Aug 19, 2013
    i found one video on how to do it and i did exactly like it said and it didnt work.
    anyone know how to do it in hammer? if you do could you maybe make a short video or post some screenshots for step bystep instructions?

    i would love you forever to who can help me with this. will also pay in leprechaun gold. :smile:

    @CCHR please
  2. Feb 24, 2011

    The "nodraw" texture is a tool texture, just search on nodraw to find it.
    When applying the nodraw texture to a face/side of a brush, the engine will completely ignore rendering/compiling it. This is super useful for optimizing.
    You should be using nodraw on faces/sides you will never see when playing, but in this case it'll work fine too.
    Nodraw will draw shadows though, so if you need an invisible brush which doesn't draw shadows but has collision i'd suggest you to use the "invisible" tool texture.
    • Like Like x 1
    • Mapping King Mapping King x 1
    • Useful Useful x 1
    • Aug 19, 2013
      ok thank you very much. gonna go give it a try. then i will report back. :smile:
    • Apr 9, 2012
      What Luffaren says is entirely true.

      To enlight more on this subject, if you mean a one-way glass window so it doesn't show up at the other side, sometimes you can still stumble across the texture being displayed at both sides in the particular map. If that's the case, it's a setting in the texture vmt which is "$nocull" "1" (or all without the " is the same). You can fix that by exporting the vmt from the vpk's (with gfcscape for example) and then put it in the respective folder and remove or tag out the command with //

      Good luck!
    • Aug 19, 2013
      works perfectly. i got another question. ( i have tons but ill ask one at a time)

      how do you setup a keypad for a door? i kinda understand but it didnt work properly for me. or maybe it did and it just wasnt how i wanted it to work.
      Post Merged, Oct 22, 2013
      Oh i see. well the way the video was saying to do it was by making one side a specific color and then changing the rendering so that that color wouldnt show up. but it was a hassle and didnt work.
    • Mar 8, 2013
      the idea is that you multiply by a factor of 10 for each key press. so if your code is 6789, pressing the 6 key would add 6 to the counter, then multiply it by 10. press 7 key: add 7, multiply by 10. press 8 key: add 8, multiply by 10, etc.

      have a look at this prefab and try to make your own implementation of it. it has all the buttons needed, a math_counter which temporarily stores your key presses, and a logic_compare which stores the correct code.

      one thing to keep in mind if you have a 0 key, is to set the counter's initial value to 10. otherwise, pressing 0 as the first number in the sequence would have no effect, since 0 * 10 = 0. this is why the compare value in the prefab I linked starts with a 1. it also has a trailing 0, due to the above-mentioned multiplication. so the code you enter as a player is 6789, but internally it's treated as 167890.

      also pay attention to the slight delays (0.05 seconds) I have on the various outputs, since the order of operations is crucial to making the keypad function properly.
      • Useful Useful x 2
      • Aug 19, 2013
        cool thank you very much satin storm. i will test it out and play around with it.


        just opened it in a new tab and its code. is there any specific way to compile it into a file to place in the folder?

        *edit again*

        nvm i just used notepad++ copied and pasted and saved it as .vmf file. seems to be working now.

        thanks again
        CCHR, Oct 22, 2013 Last edited by CCHR, Oct 22, 2013
      • Mar 8, 2013
        you're supposed to open it in Hammer (it's a vmf file like any other), but I guess your browser is interpreting it as a text file. here's a zipped version: https://dl.dropboxusercontent.com/u/2077965/ss_keypad.zip

        put the vmf in Steam\steamapps\common\Counter-Strike Source\bin\Prefabs

        to use it in a map, select the entity tool in Hammer, click where you want to place it on the grid, select Categories: Prefabs on the right side of the screen, Objects: ss_keypad, then press Enter.

        edit: oh yeah, and once it's imported, select it and press Ctrl + U to ungroup it.