I have several (~170) destructible gates that I've placed into a hashtable under a set of parent ids that group them, and I want to be able to open these gates through one of two solutions, depending on which will be easier and use less resources (I'd prefer not to have a bunch of if-statements, unless absolutely necessary). Here are the solutions I came up with, but have no idea how to do it:
1. Each group of gates has its own player group with a number given to it based on an array where the number of the player group matches the parentid of the gates. If the player is in the player group, voila! The gate they targeted with their spell opens!
or
2. A separate, different, hashtable that can be utilized to store the players allowed for that respective parentid of the gate. If the player number is listed under that parentid in the player gate hashtable, voila! The gate they target with their spell opens! I'll add their player number to that parentid as they complete the necessary requirements.
Whichever solution is easier or requires less system resources (or if there is a better way to do this), that is the one I'd prefer to use. I've created a spell that opens the gates right now, but I need to restrict them. I don't want them to open the gate until they get to the point in the quest.
1. Each group of gates has its own player group with a number given to it based on an array where the number of the player group matches the parentid of the gates. If the player is in the player group, voila! The gate they targeted with their spell opens!
or
2. A separate, different, hashtable that can be utilized to store the players allowed for that respective parentid of the gate. If the player number is listed under that parentid in the player gate hashtable, voila! The gate they target with their spell opens! I'll add their player number to that parentid as they complete the necessary requirements.
Whichever solution is easier or requires less system resources (or if there is a better way to do this), that is the one I'd prefer to use. I've created a spell that opens the gates right now, but I need to restrict them. I don't want them to open the gate until they get to the point in the quest.
Last edited: