Elevator maddness!

Elevator maddness!

Re: Elevator maddness! Posted by Xylo the Cheese on Sun Feb 22nd 2004 at 10:09pm
Xylo the Cheese
13 posts
Posted 2004-02-22 10:09pm
13 posts 1 snarkmarks Registered: Feb 12th 2004 Occupation: Student Location: CO, USA
hey all, i've been working on an office-type two-level elevator, and i've gotten it pretty far. I've looked at a bunch of tuts here and at verc, and it is quite functional right now. However, i did have a few scripting questions that I need some help with.

The more important issue is this: i'd like the doors to close when the elevator is told to move. is there an easy way to trigger a door to close?

Also, and less important, is there a way to have a pair of sliding doors move with the elevator, as in an office elevator?

I've got the entire map and a snippet of the elevator guts available here. I appreciate the help in advance! I'll try not to be a dumb @$$ this time!
Re: Elevator maddness! Posted by Wild Card on Sun Feb 22nd 2004 at 10:13pm
Wild Card
2321 posts
Posted 2004-02-22 10:13pm
2321 posts 391 snarkmarks Registered: May 20th 2002 Occupation: IT Consultant Location: Ontario, Canada
Ok, to answer your first, question. If you read my elevator tutorial here on Snarkpit (t'is the only elev tut here) http://www.snarkpit.com/editing.php?page=tutorials&game=HL&id=28

Then all you have to do, is, instead of making the button target the elevator, make it target a multimanager.

I'm too lazy to re-write how the MM works, so here's my original tutorial for it
Well, since alot of people here dont really know much about the multimanager, im going to explain it in this tutorial.

First off, the multimanager is a point based entity and has many many uses. In most if not all complex sequences, there are at least 1 if not more of them.

Setting it up is quite easy. You give it a name and make a trigger target it. If you compile a map with just that, you wont get very far.

I will describe how to make a door that, once the player pushes a button, a light turns on, then the door opens, then closes, and finally the light shuts off.

First, make your door. Give it a name and fill out the remaining propreties of it. Next, make a light of some sort. do not use textured lighting use a light entity instead.

(textured lighting is precalculated in the compile process, therefore, it cannot be "turned off")

Give it a name and the rest of its propreties. Next comes the button. Use any kind of button. Dont give it a name, instead make it target the multimanager. I know I know, you havent put one yet. Now, add a multimanager. Give it a name identical to that of the target value of the button. Now, in the multimanager propreties, click the smartedit button and then click add. In the add value, there is a proprety called name and value. I call them target and delay. In the name box type in the name of the light entity. In the value box type in the value 0 (for 0 seconds) click done then add again. This time the door name and a value of 2. then the door again but this time with a value of 6. Finally the light entity again with a value of 8. Good setup is done.

Make sure that, in the door propreties, you dont enter a delay before close value. And in the flags, click the toggle button.

There, your done. Compile and it should work.

A note however, multimanagers can only target up to 16 objects. If you want the multinanager to loop itself, the last value you should add would be the multimanager's name.

-Wild Card
That should solve your first problem. As for the second, you can either do it with a complicated set of func_trains, or you could use Spirit of HL (I think?)
Re: Elevator maddness! Posted by Xylo the Cheese on Sun Feb 22nd 2004 at 10:31pm
Xylo the Cheese
13 posts
Posted 2004-02-22 10:31pm
13 posts 1 snarkmarks Registered: Feb 12th 2004 Occupation: Student Location: CO, USA
Wild Card said:
instead of making the button target the elevator, make it target a multimanager.

....

As for the second, you can either do it with a complicated set of func_trains, or you could use Spirit of HL (I think?)
Actually, my buttons do target MM's, so i guess i could script all of the door closes as well. (I didn't know that targeting an open door would close it.) Is there any way to check the state of the door? I suppose using a few env_globals would work, but if anybody knows of an easier method i'd sure like to hear about it.

as for the moving doors, that's what i figured. switching to Spirit would probably solve both my problems!
Re: Elevator maddness! Posted by Wild Card on Sun Feb 22nd 2004 at 10:34pm
Wild Card
2321 posts
Posted 2004-02-22 10:34pm
2321 posts 391 snarkmarks Registered: May 20th 2002 Occupation: IT Consultant Location: Ontario, Canada
Ok if you make your door in VHE in the closed position, it will start in the game in the closed position. If in VHE its in the closed position but you want it to start in the game in the open position, you have to check the "starts open" flag in the door propreties.

As well, targeting your doors in your MM will either open it or close it, depending on how it is.

If its open, the MM will close it
If its closed, the MM will open it
Re: Elevator maddness! Posted by Xylo the Cheese on Sun Feb 22nd 2004 at 10:42pm
Xylo the Cheese
13 posts
Posted 2004-02-22 10:42pm
13 posts 1 snarkmarks Registered: Feb 12th 2004 Occupation: Student Location: CO, USA
that all makes sense, but i'm a tad lazy and i don't want to get away from the wait timer on the func_doors themselves. If i just keep track of the state of the doors (open vs closed) with an env_global, when the player hits the button i can decide whether to trigger the door or not. i just wondered if there was an easier way.
Re: Elevator maddness! Posted by scary_jeff on Mon Feb 23rd 2004 at 9:49am
scary_jeff
1614 posts
Posted 2004-02-23 9:49am
1614 posts 191 snarkmarks Registered: Aug 22nd 2001
I don't know if it will do any good, but you could try using func_trains instead of func_doors...
Re: Elevator maddness! Posted by wil5on on Mon Feb 23rd 2004 at 11:16am
wil5on
1733 posts
Posted 2004-02-23 11:16am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
I tried func_trains once... it was horrible. The scripting is beyond even me...

Uze teh 5piri+!
Re: Elevator maddness! Posted by Wild Card on Mon Feb 23rd 2004 at 12:15pm
Wild Card
2321 posts
Posted 2004-02-23 12:15pm
2321 posts 391 snarkmarks Registered: May 20th 2002 Occupation: IT Consultant Location: Ontario, Canada
Thing is, with Spirit, if you make your map with Spirit (as far as I know) if people want to play your map, they too will need Spirit.
Re: Elevator maddness! Posted by wil5on on Tue Feb 24th 2004 at 4:00am
wil5on
1733 posts
Posted 2004-02-24 4:00am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
You can distribute the map as a mod... like I did with Big Scientists.