Made an UID but something is wrong

I’ve duplicated 3 sprites.
So this UID works for change each tile sprite color from a single sprite

and the problem comes from the collision sub-event, when i collide with the first instance (blue) it is erased but the second instance (green) swaps its color for blue

but when i collide with the second or third instance, the color swap doesnt happen

any idea?

(sorry for the bad english)

Can you include the collision parent event in your screen shot? There isn’t enough information to understand why it’s not working as you hope.

yes, it is under each condition of ‘The variable ID of Platform equals to 1’.


and the sub-action ‘Delete the object’

I can see and understand what the events in the screen shots do. But is there another event under which they all are parented? Or are the events always running every game frame? If it’s executing continuously, what is the need to reset the ID every game frame?

And how do you initially set UID?

Should the ID order stay the same?

I’ve recreated your events in a small test project, and it works fine for me. So it may be other events that are causing an issue.

Sorry but i didnt understand because the event was made for someone else but i modified the event by adding sub events

here is the original i was trying to do: This Post is about UID (Unique Identity Number)

and i’ll be glad to see your project

Ok, can you explain what you want to happen? Should the colour swap occur? Or should each platform remain the colour it starts off with? Should all the platforms be delete-able, or just the tinted ones?

In the example linked, the ID is set once at the start of the scene. Your events set the ID every game frame (about 60 times per second).