I'm working on a Tapper clone. Currently, I have patrons that spawn at the start of the game and start moving to the right. The player moves up and down based on an array for the location. The bar counters likewise use an array to denote the start and end of the counters, so the mugs know when to fall.
I want to set an index for each spawned customer based on... something. At first, I was going to determine their appropriate index by checking them against the y values of the player's movement array, but that didn't seem to work. Now instead, I'm trying to set each customer's array based on them colliding with a SpawnPt object (an invisible object that they are spawned from), but it doesn't seem to work. So far as I can tell, they all act as though their custIndex = 0 (based on the location they are destroyed at when moving to the left), even though it should be set differently for each. Any idea of what is wrong?
For reference, c100 is a customer type under the Customers family. custIndex is an instance variable set for the Customers family.
<img src="http://i41.tinypic.com/f4jm8x.png" border="0" />