Welcome to the Builder Academy

Question setting room flags via triggers

More
15 Feb 2019 04:03 #8317 by Parnassus
My zones were relatively easy because the rooms are already attached but it sounds like you're using a more complicated method of making the rooms and and attaching them randomly which leads to much more flexibility.

My tarot deck uses 78 cards and the shuffle checks each random card to see if it's already in use. The main difference is that each player uses a different set of cards so the vars just attach themselves to each virtual deck. The problem is going to be finding where to attach your vars.

I think it should be possible to do this using a room trigger in some sort of waiting room or a mob trigger on a receptionist in the waiting room. Place a var of the room number on the trigger and have the trigger go though all available rooms and check for a var.

Actually, even easier would probably be treating it more like the maze. When the player starts, attach the rooms with exits. When the player has finished, remove all exits in that players set of rooms. This can be done using the 'key' to hold the room number vars. When a new player enters, check each random room for an exit. If an exit exists, check the next random room until you find one with no exits. This would cut down the list of vars in one place since you'd only have a limited set on each key rather than one set trying to keep track of the whole zone.

The keeping track of the whole zone thing is a whole different problem. The thing that comes to my mind is work out how many people can use the zone and keep track of the used rooms in the first section. When that section is used up, any other players would get the message that they can't enter. You might be able to save some room vnums by making a few halls that any player can enter but with exits that only the player with the matching 'key' can enter. Or, hey, how about a trigger that teleports the player from the hall to the next room vnum var on the 'key'. This can look a bit messy because they enter one room to find themselves in another room but that can be cut down by making a throw-away room that looks exactly like the one they entered except the exit will lead somewhere else.

After this example of how my brain works, aren't you glad you don't do DG anymore? :)

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

Time to create page: 0.178 seconds