Over the last few months I’ve put together a lift controller script which should please developers of enthusiast games and building simulators (hotels etc.) alike. It combines smooth, efficient, fast movement and snappy reactive logic with enough realism to keep all players happy.
An example implementation is available on the library.
Awesome! Was looking for an efficient elevator system like this one for the past few months. The one I had was pretty annoying. Question though, how come when I adjust the height of a level by dragging further up/down the script stops working?
This is the error you’d get:
Would there happen to be a way to freely adjust the levels without getting these errors? Or any work arounds? I see there’s quite a bit of code in the system, not so sure how I’d go about this as I’m not too advanced with Lua like that.
You will see a part in the model called “UpperFinal” and another called “LowerFinal”, these represent the furthest the car can go up or down the shaft respectively, and the movement works by travelling towards one of them.
UpperFinal should be positioned above the highest floor, and LowerFinal below the lowest floor, forming a theoretical line through the Level parts within each level model.
If one of the levels is beyond either of the finals, you will get an error.
I hope that solves the problem! More documentation on the way!
– tokidaso