Freddy33
Right, you using the Editor I see now, I wouldn't recommend you to rely on the Editor though, the best thing is to get used to saving the UIDs that you need on a Variable at the start of the Layout. To have more control and freedom.
Example when you work on the Games you are constantly changing things Testing, updating and deleting sprites events etc... so what I'm trying to say you don't wanna get your Events to lock to one concrete UID from the Editor, instead what you could do is to Lock them to one "Variable" so at the start of the Game you set that variable to the UID you need. This way you don't have to be worry if you delete the specific UID that your Events where targetting because they could change if you are not careful by deleting them by accident and creating new sprites on the editor making you hunt and change all the events that where Referencing the UID, and this only if you are lucky to be aware that you deleted the UID that you were targeting as it could happen that you delete it and you not aware that it was the one with that specific UID that you were referencing on your Events.
I think it would be easier if I give you a simple example because I don't want to bore you with a long post jeje
So here is my capx: https://www.dropbox.com/s/jgnyzrkenrc0y1x/Pick%20by%20UID%20From%20Editor.capx?dl=0
-As you can see I'm targeting (UID =8) before the Games starts so far good
-Now on the editor delete the green sprite with UID = 8
-And now create another instance of the blue sprite3
-Now let's bring back the instance that I delete from the Green sprite so make another instance of the Green sprite
-As you can see there is no more Green Sprite with UID =8, in fact, you can create as much as you like of the green sprites and you would not get any with (UID =8) that's why I say be careful with doing these types of events referencing UID from the editor as it wouldn't be practical in the long-term as you can easily forget deleting and creating while testing etc... but obviously it's your Game you decide, I hope I didn't bore you with the long post.
Anyway I'm glad that you fixed your problem
Hi Tarek
Firstly thank you for taking your time to do that for me.
I have carefully read over the post and liked into your example and I know exactly what you mean. Using the uid from the editor then deleting that sprite will delete all the events associated with it. I can see how this would be a problem.
Although I am unsure on how to go about creating an instance variable with a uid so this dosent happen?
This was really interesting and possibly saved a lot of time. You should submit it as a tutorial because this must affect people.
I appreciate the time.