Thanks for the reply, I have been messing around with picking by UID trying to pass that into the function as a parameter but I could not achieve a desired effect. I probably do not understand how that UID works, what is the best source of reference to learn that? I have browsed through a couple of tutorials. Have not found them useful, should you know of the most relevant one, let me know!
Voytek
1-You will need the two things the UID of who is calling the function and normally this you will pass it in a parameter when you call the function, you can add as much as parameters you like but for this you just need 1 parameter so the first parameter will count from (0) wich means on parameter 0 you will add the Sprite.UID wich will be the sprite UID who is calling the function
2-And the second one, once you created the function you need to tell the function that needs to apply those Actions that are inside the Function just to that UID who is calling the Function, this you do it by (sprite>> Pick by unick UID) then you will have to add from where? has to pick the UID so you add Pick From "Function.Param(0)" wich is the Sprite.UID that you pass when you calling the function
Example:
Trigger to call the function:
Sprite On created: Call Function "randomMove" + Add Parameter= Parameter 0 so here you add the Sprite.UID
Function:
On Function "randomMove"
Second Condition: (sprite>> Pick by unick UID) =here you add: Function.Param(0)
Here is an Example just in case you didn't understand my explanation, here I just changed two things from your capx,
Line 2: I added Second Condition: (sprite>> Pick by unick UID) =Function.Param(0)
Line 4: Added Parameter= Parameter 0 = Sprite.UID
Capx: https://www.dropbox.com/s/hx3cb8iyyid3dc0/Sine.UID.capx?dl=0