View Full Version : Lifts
Ummm how do you make lifts? Both the kind that moves when you step on it and the kind that moves when you hit a button.
04-26-2002, 09:26 PM
That is a good post on how to make elevators triggered by stepping on them, but as for the buttons, that i'm not sure on.
I don't really need to know how to trigger it with a button but I thought it would be good to know. :) So does anybody know that?
04-27-2002, 03:47 AM
It's really simple once you hear how to do it, though it's not the way I would've thought to do it. What you have to do is make the elevator a func_door instead of a func_lift. For the rest of this post, I'm going to assume you make the elevator in the lowered position. Once you've flagged it as a func_door, open the entities pane and set a lip value, but make sure it's negative. You'll probably have to play around with it, but I found that an elevator that's supposed to travel up 256 units requires a lip value of around -223. Also, make sure to set your angle to -1 (or hit the up button at the bottom of the pane). Now, for the switch, you need two things, a fake switch in the wall that really doesn't do anything, and a trigger_multiple. Make the trigger multiple a brush sized a bit bigger than a player, and position it in front of your fake switch. Make sure the trigger_multiple is flagged use_button, so that it requires the player to be standing within the trigger and to hit the use button. Now, unselect everything (or sometimes connecting won't work), and reselect the trigger_multiple, and then select the elevator, and hit ctrl+k. This should link them so that the trigger trips the elevator. Oh, I forgot to mention, if your elevator switches aren't placed so that someone standing on the elevator could hit them, it's best to assign a delay to the elevator (2 seconds is probably enough, assuming the switch is right next to the elevator) so that the user has time to get on the elevator before it takes off.
Thanks! I can't seem to get it to delay, what is the function name for that? Another question, in the game sometimes there is a panel or computer or something that you use for a switch and it changes when you use it. How is that done?
04-27-2002, 08:04 AM
Ok, the delay is a key/value set. So select your elevator entity, bring up the entities pane, and type delay in the key field, and a number in the value field. As for animating switches, the basis that I've got going (and it isn't working perfectly in every respect yet, but I do have some changing switches at present) is that every switch texture that raven used has an on and an off texture. So what you do is you make a brush with the off texture, set it to func_usable, and flag it as necessary (some of the elevator buttons, like the magenta ones with the green arrows that appear in the black spaces need to be flagged as always on or they will disappear upon being used, you can also try setting them to player_use so that the animation will happen as soon as you touch the panel, but I haven't tried this myself yet). Next, copy that entity, and change to the on texture (this one must not be flagged as always on and must be flagged as start off). If you didn't set them to player_use, select your elevator or door again, and then select one of the switch brushes, and hit ctrl+k to link them. Repeat for the other switch (this sets it up so that the switch doesn't change until the elevator starts moving). Now, reselect your elevator, and hit N to bring up the entities pane. Look for the target key, and notice its value. Now, in the key field below, type closetarget, and in the value field enter whatever was in the target key's field. This will create a new key/value pair that will reflip the switches when the elevator gets back to its original position. Now, place the on switch in the exact same spot as the off switch and you're done. This method works best for the switches that have the metal frame of the switch in both the on and off position. For the switch pairs that just add lights for the on position, you'll have to do things a little differently. The reason for this is that when the on switch texture comes on, it totally overrides the off texture, even if the off texture is set to always on. What that means is that when the switch activates, all you'll see is black space with lights in it. So, to prevent this, you'll have to make each switch out of several switches (bear with me here). First, fit your switch brush as you would normally, but don't make the entire thing an entity. Instead, carve out the black spaces, and make those two separate entities. Do the same for the on switch textures, carve out a square around the individual arrows or lights (make sure it's the same size as the squares you carved out of the off switch), and make them separate entities. Now, treat these separate entities the same as you did for the first scenario, link them to the elevator with ctrl+k and then set the closetarget to the same. One last thing, also make sure that the two black spaces in the off switch are NOT set to always on (this basically sets it up so that the black spaces in the off switch is replaced by the black space and lights from the on switch). Whew. I hope this made some sense. Trust me, it works, it's just hard to form the images and memories in my head into coherent words at 4 am.
vBulletin®, Copyright ©2000-2013, Jelsoft Enterprises Ltd.