• Stencil in 2017
    4 replies, posted
Now I'm assuming this is old code but considering the amount of uses it has I would like to find out exactly how it works. I have seen a thread [URL="https://facepunch.com/showthread.php?t=878986"]here[/URL] where I guess the guy was trying to explain it but it seemed like he just threw code in my face and I have no idea how it works. [URL="https://facepunch.com/showthread.php?t=1337232"]This thread helped me a lot more but still ran into the same problem.[/URL] It uses modern code but I still have no idea how it works, can someone help me please?
[QUOTE=Tsujimoto18;52410515]Now I'm assuming this is old code but considering the amount of uses it has I would like to find out exactly how it works. I have seen a thread [URL="https://facepunch.com/showthread.php?t=878986"]here[/URL] where I guess the guy was trying to explain it but it seemed like he just threw code in my face and I have no idea how it works. [URL="https://facepunch.com/showthread.php?t=1337232"]This thread helped me a lot more but still ran into the same problem.[/URL] It uses modern code but I still have no idea how it works, can someone help me please?[/QUOTE] Stencils haven't changed since the threads you linked were created. The first link already explains everything step by step. Is there anything specific you don't understand? Tell us what you are trying to achieve, maybe you don't even need stencils.
Thank you for the reply, why does he draw the models? I assumed that drawing models only allowed you to see the models on your screen. In the second link the guy used surface.DrawRect(), the wiki says that only draws a rectangle, why does it have the effect of an outline? In layman terms what does render.SetBlend() do? How would I go about making a model completely invisible? or even better just a part? and lastly what is the difference between calling draw model inside and outside the stencil? (I understand this will most likely be answered from the first question.) Thank you for taking your time to help me, sorry for being a n00b. I am asking mostly out of interest, I wanna learn all of the gmod code in order to "surpass" someone.
[URL="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwjxurfC3OHUAhUFrD4KHexUCkoQtwIIOzAC&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFem6SKsZUsk&usg=AFQjCNGY73hZQtBQWFbXUyanEdbVEmBzpw"]It would be great if you could show me how to do something like this. (WARNING: Very old GMod)[/URL]
Also in the second link he uses drawrect I thought you could only draw a rectangle with that
Sorry, you need to Log In to post a reply to this thread.