Here is what I want to do:
1- The player breaks some "Bricks" in a room.
2- The player leaves the room/layout.
3- The player returns to the room/layout.
4- The rooms does not re-create the bricks the player destroyed, but remains as the player left it.
I tried doing this by creating a brick spawner that only creates one brick when it's private variable 'destroyed' equals 0.
So when I destroy a Brick, the brick get's destroyed but the brick spawner stays there, and I change it's private variable 'destroyed' to 1.
When I leave the room, I save each brick spawner UID as keys, and the value of their 'destroyed' variable as their corresponding value.
When I re-enter the room, I load the hash table, I compare the keys to find the corresponding instance with their matching UID (with the "brick spawner Pick by UID equals to Hashtable.CurrentKey" sub-event, inside a "(HashTable) For each key" event), then put the HashTable.CurrentValue in its 'destroyed' variable.
Makes sense?. This doesn't seem to work.
I checked the debugger and it seems that each time I leave the room and go back to it, the bricks get a brand new/different UID, so how can I keep track of each individual brick and it's state?. Am I missing a feature that would make all this much easier?. Thanks in advance.