I'm looking to pick a sprite just by UID, not by selecting the sprite first.
Synopsis: I have a platformer which has objects in a room. As I pick up an object, I destroy it and keep track of the UID in an array. These objects differ. Eg: SpriteCoin, SpriteDiamond, SpriteDoor
When I go to another room(layout) I am reading the array and trying to remove the entries with the UID since they were picked up before.
Eg: Picked 3 items in the room. Item stored in Array(room#,Object.UID) as 1
Come back to room.
Loop through XY array
If array(Current Room#, array.YCur) = 1
UIDofSpriteToDestroy = array.Ycur
Destroy Sprite UIDofSpriteToDestroy
In searching the forums/FAQ/tutorials I see several example of picking by UID, but my understanding is that you know what sprite it is.
Can anybody provide insight?
Thanks.