Welcome to the Builder Academy

Question Trigger of the Day - Parna's Elevator

More
01 Jan 2014 05:17 #4608 by Parnassus
I've now corrected the motion checks and updated the code. The only oddity that I can spot right now is that you can't check the display or push another button in the room that set off the elevator until it stops. This is a symptom of running everything through one trigger instead of having a second trigger to look at the display. I felt that it was more important to try to write a stand-alone trigger that could be easily moved into any zone.

As far as I can tell, everything seems to be working as it should. If anyone would like to try it, I'd appreciate any suggestions, criticisms, suggestions or bugs.

Happy New Year!

Please Log in or Create an account to join the conversation.

More
24 Mar 2014 03:30 - 24 Mar 2014 03:45 #4775 by damiend97
After a little tinkering on my local MUD I finally got your trigger to work. I am particularly fond of the simplicty. If you don't mind, I would even like to refrence your trigger for later on in my MUD development lifetime. Thank you so much Parna! This trigger was really enlightening to me.

For those who may have some confusion on this, here are the simple instructions...

1. Hop on your MUD ( you must be running TBA src )

2. Design an area or use a prexisting one.
Layout for new area :
**ELEVATOR ROOM** ( this is inside the elevator and should start out on ground floor)
**WAITING ROOM** ( this is just outside of the elevator, where you would push the button to call upon the elevator and could be considered as the groundfloor )
**LEVEL 1** ( this is up one from the waiting room, but note, these two rooms are not linked to eachother. the elevator is the only way to access the level x rooms)
**LEVEL 2** ( two up from waiting room, same standards apply as level 1 room )
**LEVEL 3** ( three up from waiting room, same standards apply as level 1 room )
**LEVEL 4** ( four up from waiting room, same standards apply as level 1 room. this room can be considered as the highest level )


Horizontal Sketch -
Code:
w: waiting room: ground floor. e: elevator room: its position is dynamic. *: temporary room link: NULL position. %: placeholder room: its position is across from level<x> rooms. not literally a room until the elevator is there. numbers: represent level <x>: constantly there, not attached to any room until the elevator is on the same leve.
Code:
w 1 2 3 4 * * * * * e * % * % * % * %


Sorry if that is confusing but thats the best way i can visually represent it.

3. Attach the script to each one of the rooms ( w, e, 1, 2, 3, 4 ).
Note :
'set zone xxx':
(xxx should be equal to the zone number you are working in)
'set maxfl 4':
(this means that the top floor is at position 4. if you have 3 levels for instance, and your top floor is at 3 change the code to 'set maxfl 3'.)
'set totfl 5':
(this is however many floors you have, including e. If you don't change anything structure wise, leave this alone, but if you change how tall your building is, make sure to change this accordingly.)
'set Elevat %zone%xx':
(the xx should be the last two digits of the room where the elevator is first at - where 'e' is in the sketch)
'set Floorx %zone%xx':
(Floor<x> %zon%<xx>; x should be equal to the floor level/positioning ; xx should be equal to the last two digits of that set vnum)
'set elevdoor <direction>':
(this should be the direction of the door to the elevators. In the sketch the code would be 'set elevdoor north' since all of the levels are to the north of the elevator.)
'set roomdoor <direction>:
(this should be the opposite direction of elevdoor. It is the direction of the door from the waiting room, where you call upone the elevator, in the sketch - w - 'set roomdoor south' would be the code.)

4. Log on with a character that is level 32 and make sure that nohassle is toggled OFF.

5. Begin your journey by using the following commands :
(Room w) = "look display" = shows the current floor of the elevator
(Room w/1/2/3/4) = "push button" = brings the elevator to your floor
(Room e) = "push <x>" = brings you to floor level-x


Once again, thank you Parna - and very nice work. Keep it up!
Last edit: 24 Mar 2014 03:45 by damiend97.
The following user(s) said Thank You: Parnassus

Please Log in or Create an account to join the conversation.

More
24 Mar 2014 04:07 #4777 by Parnassus
Thank you so much, both for testing it for me and for explaining my instructions. Sometimes my mind works in strange ways and it becomes hard to understand what I'm saying. Hopefully your explanations will encourage others to test the trigger out.

If anyone is looking for existing zones to test the trigger, I've found some stairs in stock zones. I recommend that you take a copy of the zone first because you don't really want to keep elevators there. You should replace the original after you've practiced with the elevator.

room 6525 using 6599 as the elevator - Dwarven Kingdom, maxfl 4, totfl 4
room 8620 using 8698 as the elevator - Duke Kalithorn's Keep, maxfl 3, totfl 3
room 25214 using 25299 as the elevator - Castle of the Vampyre, maxfl 5, totfl 5
room 25305 using 25399 as the elevator - Windmill, maxfl 4, totfl 4

The maxfl and totfl are the same in these because they all start on floor 1. Elevators will not improve any of these zones. I only suggest this for people that want to try the trigger before they actually put it in a new zone.

I've also noticed that I've put a note in there saying that I built this trigger sometime in the future, so I'm going to edit that :)

Please Log in or Create an account to join the conversation.

More
26 Nov 2014 01:21 #5131 by Parnassus
As I mentioned, wow, almost a year ago! I wrote this trigger as a sort of experiment to see if I could put a whole elevator in one trigger that could be plugged into any zone. The only things necessary, if the zone already existed, would be a staircase, one empty room to represent the elevator and one empty trigger slot to plug the trigger into.

At the time, I realized that multiple triggers would work better and would give a better feel but the experiment was to see what could be done with one trigger slot.

As I found then, it was possible and I still think the elevator works nicely within its limitations. The main limitation, as far as I can remember, is that you can look at the display and see where the elevator is but if you've pushed the button, the display disappears. This is because the trigger is already in use.

I was telling a friend about this and he asked why I didn't just add the trigger twice to each room. Of course I answered something like, (condescendingly) "Well, because you can't attach a trigger twice to the same...ro...um...why CAN'T you attach a trigger twice to the same room?"

After thinking about this for a while, I headed back to the zone and plugged the trigger in twice in each of the rooms and the elevator itself and guess what? It seems to work. I can now go into the elevator on the ground floor, push the 4th floor and look at the display while the elevator is on the move. Since I'd already written the message to be (if you'd looked at the display while someone else had accessed the elevator from a different room):
Numbers flash across the display. The elevator is on the move.
there are no changes to make. And it looks much better than the previous message of:
You do not see that here.

If you've put the trigger into any zones or if you're using the private apartment/condo/dorm housing zone (653) you might want to try this. If any errors pop up, I'd appreciate the info, please.

Please Log in or Create an account to join the conversation.

Time to create page: 0.198 seconds