I'm relatively new to computer craft and coding in general so I have no idea what I'm doing. I'm trying to build a multi-floor elevator in my factory using Redstone in Motion carriages. I want to know if there is a way for me to write a command or press a button and have the carriage move to a specific floor through the computer. I've been reading through wiki's and watching walkthroughs but I either don't understand them or they don't cover what I need. I would really appreciate if someone could help me figure this out.
Multi-floor elevator with Redstone in Motion
Started by Jackozzy, Apr 02 2016 02:31 AM
2 replies to this topic
#1
Posted 02 April 2016 - 02:31 AM
#2
Posted 02 April 2016 - 04:27 PM
I have actually already made this in one of my worlds. It can turn into quite the monster in terms of how you wire it. You will need to use bundled wires not sure if you have them in your mod pack but if you are using tekkit then you should.
For each floor, I had a redstone signal that would go to the computer to tell it the elevator was on that floor. I did this by adding a redstone block to elevator that would land inline with a wire once it reached the floor.
Now that you have a way of reading what floor its on you just have to program how many moves you have to go to reach the goal. I think on my example it was 4 block per floor so if i need to go down 2 floors i moved down 8 times.
If you didn't know, you will be needing this link allot. http://www.computerc.../Redstone_(API)
If you want to eliminate some wire i would also look here. http://www.computerc...ki/Rednet_(API)
P.S: Don't use the rednet if you having to much of a hard time with computercraft it will complicate your code a bit.
For each floor, I had a redstone signal that would go to the computer to tell it the elevator was on that floor. I did this by adding a redstone block to elevator that would land inline with a wire once it reached the floor.
Now that you have a way of reading what floor its on you just have to program how many moves you have to go to reach the goal. I think on my example it was 4 block per floor so if i need to go down 2 floors i moved down 8 times.
If you didn't know, you will be needing this link allot. http://www.computerc.../Redstone_(API)
If you want to eliminate some wire i would also look here. http://www.computerc...ki/Rednet_(API)
P.S: Don't use the rednet if you having to much of a hard time with computercraft it will complicate your code a bit.
#3
Posted 02 April 2016 - 05:44 PM
I actually found the code for the program i did. I was very new to programming when i made this so take it with a grain of salt.... but it does work. Maybe you can improve on it or just use it.
It works by using a computer on each floor to act like a terminal. Then it will send a wireless rednet signal to the computer controlling the motors. Also keep in mind that is was made to work on a 2 floor building only. You need to improve it a bit if you want more.
this is the code for the terminal: Edit:This terminal is for the top floor
I wish got into the habit of adding more comments when i made this but if you have any questions about it you can just ask and I'm sure i can work it out.
It works by using a computer on each floor to act like a terminal. Then it will send a wireless rednet signal to the computer controlling the motors. Also keep in mind that is was made to work on a 2 floor building only. You need to improve it a bit if you want more.
this is the code for the terminal: Edit:This terminal is for the top floor
Spoiler
This the code for the computer controlling the motors:
Spoiler
I wish got into the habit of adding more comments when i made this but if you have any questions about it you can just ask and I'm sure i can work it out.
Edited by Unknowntissue, 02 April 2016 - 06:09 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











