UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Multifloor Elevator with Sliding Door

broken avatar :(
Created 3 years ago
by frogkm
0 Members and 1 Guest are viewing this topic.
1,513 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 June 2021
Last active: 1 year ago
Posts
6
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
frogkm's Groups
frogkm's Contact & Social Links
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/file

Usage
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!


broken avatar :(
×
broken avatar :(
Location: cn
Date Registered: 14 May 2020
Last active: 8 months ago
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
zhangtanxi177520's Contact & Social Links
Very good. I'll put it in my map
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 29 December 2020
Last active: 4 weeks ago
Posts
9
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
DontGetSeen's Groups
DontGetSeen's Contact & Social Links
Hey man!, not sure if you will reply to this but. How would i get around to adding the sounds to the elavator??
 
:fish_cake:1
broken avatar :(
×
broken avatar :(
Location: deBrandenburg,DE
Date Registered: 9 May 2019
Last active: 1 hour ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
B0hnez's Groups
B0hnez's Contact & Social LinksEl_B0hnezhttps://www.youtube.com/c
Hello, first of all nice work, but i have a question, can u edit the script for me so the elevator only works when power_on, and the caller_triggers hintstring is "the Power must be activated first" ? i looked into ur script but i dont understand much of it ^^ it would be a pleasure for me if i could help me :)
 
-B0hnez
:bman1:2

 
Loading ...