Hello,
I want one sprite to follow another sprite, and have this dynamically configured -- which follows which.
To this end i have an instance variable in each sprite where i set what sprite is the follower and what sprite it follows.
I now need to do a loop that (during every tick) picks out a first sprite, looks-up an its instance variable the another sprite, and then picks the other sprite to retrieve its location information.
But, how do i pick a second sprite within the loop since i only can refer to one sprite type in the loop -- how does the loop know which sprite i am referring to -- or how i can tell the loop which sprite i want to refer to for picking
any thoughts are much appreciated,
Dan