Call of Duty: Black Ops 3 => Tutorial Desk => Scripting => Topic started by: ZombieKid164 on May 18, 2017, 09:50:47 pm
Title: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: ZombieKid164 on May 18, 2017, 09:50:47 pm
(Note: Again, I originally posted this on modme, but I decided to post it here in case any ugx-only users needed it :alone:)
Hello again! (I know it's been a while...) I recreated my elevator script, which adds one main feature: You can now call the elevator. This should fix prior problems with having to make it start at the top, plus some people here and lots on Modme were asking for the call feature. In case you never saw the first post, here are the features: -Sliding Doors -Elevator -Call Feature -Editable numbers (You can adjust the elevator to your liking) All of the things you will need are in the download (I've made it so you no longer need a separate download if your doors open sideways)
(Note: Again, I originally posted this on modme, but I decided to post it here in case any ugx-only users needed it :alone:)
(Content removed from quote.) Hello again! (I know it's been a while...) I recreated my elevator script, which adds one main feature: You can now call the elevator. This should fix prior problems with having to make it start at the top, plus some people here and lots on Modme were asking for the call feature. In case you never saw the first post, here are the features: -Sliding Doors -Elevator -Call Feature -Editable numbers (You can adjust the elevator to your liking) All of the things you will need are in the download (I've made it so you no longer need a separate download if your doors open sideways)
Nice, scripting. Just one suggestion though, I've done elevator scripts before, and the problem is that players glitch through the floor iif they jump around or move too much. You can solve that problem by using this function on the elevator floor:
This will match the player's velocity with the elevator's, and prevent any derpy behavior. *edit - Also I believe in radiant there is an option on script_model and script_brushmodels to enable them as a moving platform. It's in the kvp's, I have only tested the function via script though so you'd have to test that.
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: Wolfilms on July 02, 2017, 12:46:32 am
Quote
Also I believe in radiant there is an option on script_model and script_brushmodels to enable them as a moving platform. It's in the kvp's, I have only tested the function via script though so you'd have to test that.
I have tested this out by ticking the setting in radiant, and I have found that it works without having to need any code.
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: Archaicvirus on July 02, 2017, 06:43:22 pm
Can one of you explain how you did it? I'm not sure where to put the script or which ksp to add or change.
I personally think the radiant way is easier, so here's how to do it in radiant.
Select the platform that you stand on for the elevator
Hit the 'N' key to open the entity info
select the option that says "moving_platform_enabled" so it says "true"
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: TotiJr on July 21, 2017, 08:33:44 pm
Thanks, it worked. Does anyone know how to use multiple of these at a time? As soon as i turn on the power the game crashes. Im assuming it has to do with the triggers being the exact same, as well as the debugger saying the same thing. Would i just change the trigger names? How do i get rid of the debugger on only one so that it wont say everything twice?
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: Wolfilms on July 22, 2017, 01:13:50 am
I believe you would have to change all the kvp's on the elevator parts, and the triggers. You would then have to make sure all those kvp's are in the script and have all the code necessary assigned to them. I could be wrong as I haven't really taken a glance at the code, but I'm guessing that is how it would be done. I can try and explain more if this doesn't really help/make sense :)
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: TotiJr on July 24, 2017, 01:38:10 am
Yeah, I've been able to successfully duplicate the files and change the target names, but when i go in game whenever i turn on power the new one i made works 100%, but the original still says it needs power. Any ideas? Maybe its conflicting functions to wait for power, but I'm not sure how to resolve that. And if it was that I'd think that the original one would work rather than the new one or the game would just crash.
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: Wolfilms on July 24, 2017, 04:53:24 pm
Did you change the name of the wait_for_power() function? That might be a problem if you haven't done that.
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: TotiJr on July 24, 2017, 10:21:17 pm
Change what? Because there are only 3 statements that involve power?
function wait_for_power() level flag::wait_till( "power_on" ); wait_for_power(); I already tried adding a 1 in each statement after the word "power" but the problem seems to consist, and for some reason after I change it on level flag it doesn't even bother showing up the debug text from that elevator.
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: Wolfilms on July 25, 2017, 04:02:17 pm
Change what? Because there are only 3 statements that involve power?
function wait_for_power() level flag::wait_till( "power_on" ); wait_for_power(); I already tried adding a 1 in each statement after the word "power" but the problem seems to consist, and for some reason after I change it on level flag it doesn't even bother showing up the debug text from that elevator.
Can you post your code here so I can see what you are working with?
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: TotiJr on July 26, 2017, 09:49:47 pm
//This is the gsc file for the elevator // ZombieKid164's buyable elevator
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: soap-0723 on February 18, 2018, 10:13:55 pm
How do you change it so that the power isn't required to operate it? sorry, im a noob.
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: soap-0723 on February 19, 2018, 04:36:59 am
Zombies wont follow me inside? i don't want people to go in there just to glitch my maps.. is there any fix?
Title: Re: [Tutorial] How to add a buyable elevator (V2) [Now with call feature]
Post by: joshs1982 on June 08, 2019, 05:27:41 pm
Could one of you please help me with my elevator code I'm not sure what I'm doing wrong? Here is my script.