How would I go about making an elevator system for a platform game?
Not just a simple back and forth movement but something that stops at desired floors through pressing the corresponding button.
I tried messing around with custom movement but ended up using the sine behavior on the elevator in a way that it only moves when the player is standing on it.
SineElevatorExample
Far from perfect I know. And the player jumps/lags quite a bit. Attempted to fix the lag by looking at the example Yann posted here: Vertical Moving Platform
...but instead the entire elevator lagged immensly.
Here is a similar test layout where I wanted to use the buttons to make the elevator move to the desired floor, but I don't know where to start!
Global variables, instance variables? Loops?ButtonsMovingElevator
The layouts are all just mockups to test if things work.
And don't mind the silly testdummy in the first capx!
I do not expect a cake on a silver plate but any little help to show me the way is greatly appreciated. Sorry if I missed a topic already explaining something similar.
If you take a look at this, thank you in advance!