I want to create an advanced elevator, but unfortunately I have no idea how to go about it. I was hoping someone (drofder) could help me out. First, it needs to be a two-way elevator that goes from story 1 to story 2 and back. Each level needs to have an outer button that can be pressed to call the elevator to that level and open the door. When the person is inside the elevator there should be 2 buttons. One for the top story, one for the bottom story. If the door is open, pressing the button to go down/up once should close the door. Pressing it a second time should make the elevator go down/up and open the door on the other floor. If the door is closed and you press the button for the floor you are on, it should open the door.
Is this possible, reasonable, and are there any ways to simplify it?
An Elevator
Moderator: Core Staff
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: An Elevator
Yep, KS has it spot on.
Each level make a vairable
elevator.floor_1 = (0,0,0);
etc
Then create an elevator status variable
i.e
elevator.status = 1 / 2 / 3
Each number represents a different thing.
1 = Bottom floor
2 = 2nd floor
etc
and finally, a door open/closed variable
elevator.door = open/closed
Then through use of correctly placed if statements, you can create the desired effect.
Start with obviously a button detection script.
Then check if the doors are open/closed
Then check which floor it is at and whether or not to open/close/move the elevator
Then repeat.
Write it yourself and then let us know how you get on and we can help from there.
Each level make a vairable
elevator.floor_1 = (0,0,0);
etc
Then create an elevator status variable
i.e
elevator.status = 1 / 2 / 3
Each number represents a different thing.
1 = Bottom floor
2 = 2nd floor
etc
and finally, a door open/closed variable
elevator.door = open/closed
Then through use of correctly placed if statements, you can create the desired effect.
Start with obviously a button detection script.
Then check if the doors are open/closed
Then check which floor it is at and whether or not to open/close/move the elevator
Then repeat.
Write it yourself and then let us know how you get on and we can help from there.

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: An Elevator
Damn, I really need to learn scripting beyond rotate and moveto commands
I get the concept of what you are saying, I just don't really know the syntax and how to put it all together. Is there any map that has used these commands so I can see a sample of them in action?

Re: An Elevator
Your map, for the right priceSoviet wrote:Is there any map that has used these commands so I can see a sample of them in action?



Who is online
Users browsing this forum: No registered users and 4 guests