HI John, YOu do not need to create a second array. You can keep a reference to your position in the first array, and then check dynamically which element to show next, forward or backward depending on which direction the player moves in the menu.
You can choose to skip options which do not meet the criteria you do not want. I'm not saying that creating a second array is a bad idea or anything by the way, it actually may be desirable to do this depending on how your code is set up, how large / complex your initial array is, and how much of your sanity you would like to hold on to. ;) Just mentioning that both methods are possible. If you send along some code, it will be easier to give you a better, more precise response. Thanks, Cara :)--- iOS design and development - LookTel.com --- View my Online Portfolio at: http://www.onemodelplace.com/CaraQuinn Follow me on Twitter! https://twitter.com/ModelCara On Feb 27, 2014, at 11:26 AM, john <[email protected]> wrote: HI all, I'm working on some code, and part of my project involves menus that I need to self-create based on the values of variables in an array. I think I've got a relatively solid idea of how I want this to function, but I'm looking for some advice from the experts. The basic concept is: I have an array of objects, each of which contains a status and reference variable. I want to build a menu that will loop through the array, and only include those items that have their status variable set to a specific value. I also need the menu display to include the value of the reference variable. I've considered a few different ways of doing this, and the one that's standing out as best would be to look through the array of objects, and then set up an array of ints that contain only the reference numbers for the needed objects. I would then be able to use my array of ints in the names of items on the menu. In the final product, this will (hopefully) look somewhat like the target menus from trek2000 and final conflict, where only the ships in range are displayed. Any hints/tips/thoughts would be greatly appreciated. --- Gamers mailing list __ [email protected] If you want to leave the list, send E-mail to [email protected]. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/[email protected]. If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected]. --- Gamers mailing list __ [email protected] If you want to leave the list, send E-mail to [email protected]. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/[email protected]. If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected].
