Elevator

Thanks, but can you show me what the behaviors to my elevator should look like. I looked at the elevator in “Stacey”, but it’s still a little confusing.

Everything is bundle up and named. Inside the Elevator object, go to the “Movement” Bundle:
Anotao 2020-08-04 001336

This is the main setup you need.

For your game: make the switch turn off itself after the first input, replace the impulse with a velocity, turn off the “movable” option in the Physics tab (don’t forget to make the Elevator a polygon again).

Anotao 2020-08-04 001830

To make the elevator stop, connect a number “0” to the y velocity.

Thanks a lot @PixelPizza, this was very helpful. I will add the logic into the game and let you know if I have any other problems. :slight_smile:

I must’ve missed something because the elevator won’t go up. Did I have to add the “Start Elevator” bundle or is it something else that I missed?

Anotao 2020-08-04 111451

It’s not moving because you are stopping the elevator at the same time you start it.
Try using a timer, collision, or the “up” output of the Keyboard behavior to stop the elevator.

ok, I will try that

It will move now, but I have to hit the down arrow for it to go up instead of the up arrow

Nevermind, I fixed that, but the elevator won’t collide with anything

Is it because it isn’t movable?

I suggested other alternatives above.
Timer
Keyboard “up” output (when you let go of the key.
Raycast

ok, but do these alternatives have anything to do with the fact that the elevator won’t collide with anything?

Nevermind, I used the timer but every time you use the elevator it goes down a little further and up a little less. Can u help fix this?

I’ve looked through it several times and can’t find the problem.

Now, there is a different problem. The door is not level with the elevator when it goes down

please help

Anotao 2020-08-05 151534

Use this to make the door follow the elevator. (Logic inside the door object, don’t forget to delete your old logic otherwise they will overlap).

If you would like to have multiple elevators, use globals instead (removing the door is also always an option).

Ok, I think I am going to make another elevator and I used this logic in the door, but the door goes flying away when I press play.
https://flowlab.io/game/play/1438331

Now the door is uneven and the elevator goes down a little further each time

Seems to be working just fine to me. You fixed it.

For me the door is still uneven