Jump to content

Home

Elevator with working door inside


Lord_Frieza

Recommended Posts

Ok, I'm making an elevator that goes up and down a shaft like any other except it has a door inside, Is there anyway to make the elevator reach it's destination then have the door in the elevator open up. Theres a good example of what I mean in one of the doomgiver levels on JO, except it's a tram system, the actual tram has a door inside it when reaching it's destination the door opens up allowing kyle to leave the tram.

 

I can't get the door and elevator to function as one,

Please help me asap thanks :)

Link to comment
Share on other sites

Well, you need to use two entities: One serves as the main bulk of the elevator, and the other one as the door.

 

First move the entity serving as a door so that it opens to let the player in, then close it. Move both the door and the chassis simultaneously to the target location, and repeat the door movement.

 

Should work pretty easily and in a straightforward manner, really.

Link to comment
Share on other sites

Well, you're going to want to use scripts (Or maybe you don't want to, but I reckon you'll have to), and if you want the door to always be open while the tram is in the station, then it doesn't really need to be a door. Just write a script to move the tram and door, then when the tram arrives, script the door to open.

Link to comment
Share on other sites

Aye, I don't see any other way than scripting. However, as long as you aren't planning a multistop elevator allowing the player to choose the target floor with switches, the scripting will be very easy, and you practically only need to do it once.

 

After one working draft you can easily modify a version for all your elevators. You could make an universal lift script, as well, but I don't really recommend that. Better you create an individual script version for each separate lift.

Link to comment
Share on other sites

OK, if i must use scripting can anybody tell me how to script this particular lift. I know how to script but this is rather difficult and i don't fully understand it.

 

Basically i want the lift door to open (let player into lift), close. Lift to move up/down (with door and lift as one structure) the at the destination for the door to reopen and let the player out then for the lift to return to it's original position ready for re-use.

 

Any help would be great thanks :)

Link to comment
Share on other sites

It's no more difficult than any other scripted elevator. Search these forums for some explanations of scripted elevators (JO or JA, doesn't matter), or check the Raven example maps & scripts. Just keep a couple of things in mind:

 

Unless you indent affects, meaning that as long as they are equal in the (current) script root, with no time consuming commands between them, they are executed simultaneously. This allows you to move the chassis and the door at the same time.

 

However, bear in mind that because they will be separate entities, you won't want to allow players to be able to block the movement of the elevator, because that could disrupt the synchronous movement of the two entities, resulting in either the door or the chassis to arrive earlier at the target position than the other component.

 

All in all, it's very basic scripting.

Link to comment
Share on other sites

I remember i managed to get a model to move with a lift by targeting the model from the lift. the model then moved WITH the lift. Could this apply with doors?

 

This has no relevance whatsoever here. If you target a door entity at something, it doesn't mean the door would move with that other entity. Check the entity properties in Radiant for further enlightenment.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...