
Originally Posted by
-=Fox=-
A basic noob trap can be made pretty easily with the E-gate, as a demo, I'll make one :lol:
To use copy this to notepad, save it, then it goes into your Garry's Mod folder -> Data -> Expression Gate
N@Noob Trap
I@Ranger
O@Explode
#Let's create a timing function set to pulse at 1 second
interval(1000)
#Keep track of your timer, by having it increment a value.
#Also have it wait for input from a Ranger.
clk() & Ranger > 0 -> A += 1;
#Reset the timer when it hits 4 seconds (so it counts 3 full seconds).
A == 4 -> A = 0;
#Give a value to compare the timer to so that it counts down.
#Subtract the incrementing value against the constant value.
B = 3 - A
#Set Explode to default to 0 then, Set teh Bomb
Explode = 0, B == 0 -> Explode = 1;
Wire the wired explosive to Explode and the Ranger input to a Ranger set to find distance. That should do it (untested). So when the ranger has something in front of it, the timer will count down in about 3 seconds then trigger the explosive.
Let me know how it works, I can't test it at the moment :lol:
Bookmarks