This script + prefab allows for as many elevators as you want in a map, each with as many floors as you'd like.
The elevators have doors to prevent players from entering or exiting while the elevator is in motion.
Download link:
https://www.mediafire.com/file/1xwxvdex98nw2uj/frogkm_elevator.zip/fileUsage
Move elevator.gsc into yourmapname/maps folder
Then in your yourmapname.gsc file, insert the line:
thread maps\elevator::main();
right below where you see the line that contains maps\_zombiemode::main();
Even without any elevators in your map, this script should not break anything.
To add an elevator to your map, choose a prefab from the elevator_prefabs folder and place it in your map.
There's 4 different prefabs:
elevator.map - A barebones 2 floor elevator
elevator_manyfloors.map - A barebones 5 floor elevator
elevator_with_shaft.map - A 2 floor elevator in a shaft
elevator_with_shaft_manyfloors.map - A 5 floor elevator in a shaft
That's it! The elevator should work out of the box.
To add more floors:
To add a floor, all you need to do is copy one of the elevator caller triggers, and place it where you want it.
Make sure to change the target value of the trigger to the same target as the other caller triggers of your floors.
Its target value may automatically change when copied, so this is important.
Elevators will automatically go to the location of their associated callers, no other changes required.
Other notes:
You can add as many elevators as you want to your map, and they will work independently of one another.
To avoid getting stuck in the floor while moving, the elevator overshoots its destination slightly then readjusts quickly, to unstuck any players.
It's possible to get stuck in the elevator door! You can make your own fix for this by adding some form of clipping as soon as the door begins moving, but I haven't gotten around to it.
Add your own custom sounds to the elevator!
Feel free to edit the script as you like, and message me with any questions!
That's it! Enjoy your elevators and make some cool maps!

