Hi,
I am trying to work out which sprite is nearest to a certain object at any given time and then store the co-ordinates of that sprite. Currently I have tried two options as below. The first one it will give the co ordinates of the last sprite moving. The other attempt only stores the first sprite.
All of the 8 sprites I want to check are bowls and each one is its own separate sprite, not a clone etc..
They are all added to a family together called collision including the small yellow jack. I'm sure its probably easy when you know how!
My aim is to work out which bowl is closest to the jack so the computer AI can work out if to bowl above or bellow the middle block.
Any help would be appreciated!!
ingame:
attemp1:
2: