I've been trying to create an elevator in blueprints, incorporating the generic button and blueprint interfaces that I learned. It's a good exercise but man is it hard to get a hold on it
Here's the design (I've marked the points I'm aiming for in the first version of the elevator)
Here's the design (I've marked the points I'm aiming for in the first version of the elevator)
- Elevator that goes to 4 floors.
- Floor 0, Floor 1, Floor 2, Floor 3, Floor 4
- Each floor got a "Call Elevator" button, which tells the elevator to go to that floor
- The elevator has 6 buttons in it
- One for each floor, an emergency STOP button that stops the elevator and an OPEN DOORS button that opens the doors if the elevator is not moving.
- If PL chooses to go to the same floor they are on, the doors will open to let PL out of the elevator
- Same goes if PL is outside the elevator and calls the elevator to the floor the elevator is already at.
- If PL chooses to go to the same floor they are on, the doors will open to let PL out of the elevator
- One for each floor, an emergency STOP button that stops the elevator and an OPEN DOORS button that opens the doors if the elevator is not moving.
- When the elevator has arrived at a floor there is a "ding" sound and the doors open to let PL in/out
- After X seconds the doors will check if there is something in the way
- If there is nothing in the way they will close
- If there is something in the way they will remain open for X seconds and try again
- If something is in the way while they are closing they will open again and wait X seconds before trying to close again
- When PL picks a destination floor the doors close (they do the same checks as above) and the elevator starts moving to that floor.
- If PL presses other buttons during elevator travel, it will stop by those floors based on these rules:
- If the elevator is moving and the floor is on the way to PLs initial destination the elevator will stop there to let PL out, then it will continue to the other destination which it has queued up.
- If the freshly input floor is in the opposite direction of where the elevator is going, it will first reach the initial destination and then go to the opposite direction destination
- If PL presses other buttons during elevator travel, it will stop by those floors based on these rules: