Thanks for the reply. I'm trying to understand what exactly are the rules for running functions against a picked set of objects.
Actions always try to apply to one object. Without a condition, an action has no way to pick an object, so it applies to all objects.
Per my 2nd post above, I believe the rule is: object-specific actions are run once for each object picked, non-object-specific actions run only once per event (regardless of how many objects are picked).
But when you add a condition, the action gets some instruction. If the condition could be satisfied by multiple objects, it picks one at random. Adding "for each" forces the actions to repeat for each object that satisfies it.
So in your top event, the function is only picking one random Sprite uid. If you add a "for each sprite" on that subevent, it should call the function three times.
Re: "random", I'm guessing C3 doesn't pick objects at random. There are probably some rules it follows for to decide which object UID to pass to the function - e.g., it picks the object with the smallest UID. That's what my code does every time, it picks the Sprite with the smallest UID.