Hi,
Yeah I have an UID parameter in all functions that identify which instance is picked. The function is run for each instance that meets the original conditions to trigger the function.
Functions won't really slow you down, but For Each will! You have to be careful when using it. One tip I have is to make sure you do all the picking BEFORE the For Each
For examnple:
you have 10 sprites. 5 are blue and 5 are red
Sprite = Blue
For Each Sprite
This will run 5 times. First it picks all the sprites that are blue, and then it goes over each one
For Each Sprite
Sprite = Blue
This will run 10 times. It will go through each Sprite one by one, checking if it's blue
So you want to do your picking before your For Eaches when possible. This will weed out only the objects you need to do For Each on, which will help performance