So I'm saving a map object into a list during an event, essentially recording the x and y tile location of each mouse event.
However what I'm finding in the process is that the x and y of each tile location are all the same for every entry in the list.
So my 'tile' attribute which I'm using as an intermediate variable for my x and y values, before storing it in my list--when I change my tile attribute, ALL copies of it in the list are ALSO changed.
From what I could find in the manual and online, the problem is due to Stencyl using shallow copying. I found the 'copy map/list' blocks but according to what I read, these only do shallow copies as well.
I take it I need to use the 'new map' block each time I store a new entry, and then modify the entry itself after it is already stored in the list, or is there a better method that I'm not aware of?
I'm grateful for any help and insight that anyone reading this can provide. Thanks.