So, i've got a situation here...
i have to use an array with arrayMaker to collect a non-finite number of gameobjects that were spawned by a different object and store them in an array... as well as the distance from the object which is making these calculations.
the reason is that i'm trying to create a damage calculator for an enemy when it interacts with fire "seeds" within a certain range so i can calculate how much to multiply the base damage... the distance is so that i can filter out the seeds that are outside of it's range... i can get it to find the closest but that works with only one... do you think it's an idea to create the array, find the closest, add it to the array and then turn a switch/bool in it so that it is excluded with the loop to find the next closest?
Example: Say the enemy is hit with four fire "seeds"... i need it to count the number of seeds that it's hit with... from there, i want to multiply the base damage rate by four (which is the number that it's hit by.) further, say it's neighbour is only hit by two fire "seeds"... i need it to collect those seeds so it knows how many it was hit by. even further, say there is an enemy that's hit with twenty fire "seeds"... again, get the count and calculate the damage accordingly.
if so, any tips would be greatly appreciated.