do u know how to use search?
i want a Hydraulic to go up slow so you can press a + and - button to raise and lower the elevator in E2 of couse can any1 give me a code i can use for itlike it do whit hover balls
![]()
Put some more effort in your posts, and someone might actually help you.
Also, search before posting. I'm sure this has been requested before.
"If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
-- Niels Bohr
there isn't actually an E2 funtion for ewery key
so just make an numpad input (+) and numpad input (-)
Wire the inputs to e2 Chip
isn't tested (made outside garry here on forum)PHP Code:@outputs Value
@inputs Incr Decr
if(first()){N=1}
if (Incr){Value+=N}elseif(Decr){Value-=N}else{Value=Value}
N is the Value how much it changes per click of numpad
SVN Tutorial
My SVN:Get dropbox and get 250 MB extra space: DropboxCode:http://divranspack.googlecode.com/svn/trunk/%20divranspack/
i will make a search for it but thanks for the help![]()
i found it but now i got an ohter problem
i will get an door for my elevator so it opens when it comes to floor 0-1-2-3
Code:
@name Elevator
@inputs A B C D
@outputs Hydraulic Door
if (A == 1) {Hydraulic=90}
if (B == 1) {Hydraulic=180}
if (C == 1) {Hydraulic=270}
if (D == 1) {Hydraulic=0}
if (Hydraulic==90) {Door=0} else {Door=47}
if (Hydraulic==180) {Door=0} else {Door=47}
if (Hydraulic==270) {Door=0} else {Door=47}
if (Hydraulic==0) {Door=0} else {Door=47}
Code:end
D=0
thats what i started whit but it only opens at floor 0
or shut i just use rangers at each floor to open and close
pls help
One problem with your code, is that it relies on what you are outputting to the hydraulic. This means, when you press the button to go to floor 3, the door will open, and then it will travel.
I would put a ranger on top the elevator, so it's pointing towards the roof of the elevator shaft. Then, measure what the ranger reads at each floor. So at the ground floor, it might measure 250, at the second floor, maybe 210, or whatever.
Then use if(inrange(Ranger, Distance 1, Distance 2)) {Door = 0} else {Door = 47}
Where Distance 1 and 2 are the measurements at each floor, + or - 5.
So if the measurement for the first floor was 250, and the second floor was 530, you'd use this:
if(inrange(Ranger, 245, 255)) {Door = 0} else {Door = 47}
if(inrange(Ranger, 525, 535)) {Door = 0} else {Door = 47}
I can't understand why your elevator door will only open at the ground floor though.
Bookmarks