Gmod Wire Keypad (Addon) Help!

Hey guys, I’m not great with wire or the expression chip, but I’ve started making a fort thing for myself and a few friends, I’ve made a door that opens when the keypads code is correct, also when a button is pressed on the other side using Wire Hydrolic, Expression 1, Smoother and Constant Value. It all works great,


I wanna know how to link my turrets up so that when you get the code wrong, you get the s**t shot out of you rofl.

I’ve messed about with it but can’t work it out :frowning:

Any Ideas?

Thanks, Tom.

No then, sigh.

Wire the “Fire” of the turret it the “Invalid” of the Keypad.

That’s how to make the turret shoot, yes.
To make the door open and close using both the keypad and a button, use an or(any) chip.

he got the door to work

Oh. I read it too fast.

But use Expression 2. Calculates faster, causes less lagg, is easier, has a cooler editor, and you can do more stuff with it than with E1.

also, I think they might be getting rid of E1 (not sure though)

Ah right, thanks guys. I just started with E1 'coz it’s easier and I’m new, gonna try some E2 soon when I find a decent tutorial.

Also, no one answered my question as I hoped, I didnt give enough info I dont think.

I just want it to shoot, for say, 5 seconds, then reset. I get it to shoot, but it just continues to shoot, and doesn’t go off :frowning:

If you want the door to open using a hydrolic, then you would need something to change the length of the hydrolic itself. For example, the keypad when in toggle mode could have a valid output of X. But to actually make it close after a certain time, you’re going to need E2 beacause of its easy uses of timers.

Yeah you’re a beginner and you want to start with the easiest thing, so you got right for the hardest thing. Expression 2 is over nine thousand times easier than Expression 1. It just has more commands, which are hard yes, but you don’t have to use them if you don’t want to.

Quoting myself from another post for some decent expression 2 tutorials:

@name Timer
@inputs Go
@outputs Out
@trigger all
if (Go & !Out) { #If you push the button, and Out is not already 1
Out = 1 #Set out to 1
timer("Off",5000) #Start a 5 second timer
if (clk("Off")) { #If the timer is done
Out = 0 #Set out to 0 again

See? Expression 2 is WAY easier.

Edit: By the way,
“Go” is exactly the same as “Go != 0”
“!Out” is exactly the same as “Out == 0”
Just shorter to write.