(HALFLY-SOLVED) Object picking with "Create Object" function in an extension

Hi guys. I am trying to compact my object creating code into a simple function. I intended to make it capable of creating object at x-y position, with angle, on a layer and Z order, and link it to an object. All in a same function block.
Like in number 1
and I use it like in number 2

I put “unpick all” to clear picked object before each loop. First “create object” is the one without linking, it creates the HUD. The second is the one with linking from the function page on first picture, it creates number.

I expect the first create function to pick up the newly created “stationmaster_base_slot” object like the built-in create function and parse its position info to the second one.

But when it looped again, the number just spawned and stacked on the first HUD.
Like in number 3
I interpret that the function I made is not picking up the newly created object.
The same happen with that stacked text, it also picks the position of the first-created brighter card object.

I try turning on a boolean variable that indicate if the object is newly created, then pick the object, and then turn it off, all inside the function. But it’s also not working.

So, how can i pick that newly created object from the function up? or is this already a widely known problem or feature? or did I misunderstand something? I will greatly appreciate any info or advice for that will greatly help my game-making adventure. Thank you in advance!

Oh, so I just try something, and now it works (don’t mind that offsetting text, I will ask about that in a new post)

But I still need explanation about this, as the solution further complicated my knowledge about object picking.

The solution is in event block below. I just take “unpick” from top circled block and dispersed it just before I create respective object (unpick A before creating A, B before B, and so on). But why? Why it only works if I put it directly above the creating function but not in another block or the top-looping parent block? I will greatly appreciate a lecture about object picking, scoping, or something like that!