Your Ad Here

Subscribe
 Post #1
 29th July 2009
deagle2142's Avatar
July 2009
8 Posts
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,


BUT

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 :(


Any Ideas?

Thanks, Tom.
 Post #2
 30th July 2009
deagle2142's Avatar
July 2009
8 Posts
No then, sigh.
 Post #3
 30th July 2009
Carlisle's Avatar
March 2009
1,605 Posts
Wire the "Fire" of the turret it the "Invalid" of the Keypad.
 Post #4
 30th July 2009
Gold Member
Divran's Avatar
April 2008
4,474 Posts
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.
 Post #5
 30th July 2009
Carlisle's Avatar
March 2009
1,605 Posts
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
he got the door to work
 Post #6
 30th July 2009 Last edited by Divran; 30th July 2009 at 09:22PM..
Gold Member
Divran's Avatar
April 2008
4,474 Posts
he got the door to work
Oh. I read it too fast.

Edit:
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.
 Post #7
 30th July 2009
Carlisle's Avatar
March 2009
1,605 Posts
also, I think they might be getting rid of E1 (not sure though)
 Post #8
 4th August 2009
deagle2142's Avatar
July 2009
8 Posts
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 :(
 Post #9
 4th August 2009
ubernoober89's Avatar
December 2008
15 Posts
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.
 Post #10
 4th August 2009 Last edited by Divran; 4th August 2009 at 10:16PM..
Gold Member
Divran's Avatar
April 2008
4,474 Posts
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.
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:

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 :(
Code:
@name Timer
@inputs Go
@outputs Out
@persist
@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.
Reply

All times are GMT. The time now is 06:31AM.

Facepunch Studios 2010 - Server 'MARGE'