Use a set of subevents. Pin to object is an action, so set up events for each condition and pin type you want.
If spawning object instance variable is a, then pin to object with x mode.
If spawning object instance variable is b, then pin to object with y mode.