I’m a bit confused. I have a single square tile with a collision object.
And that tile has a script attached to it called single_tile.
That tile is then put into several tiles to make up a polyomino (tetris shape) as a collection.
What I don’t understand is how do I send a message to an individual tile? When I put this statement in the init function of the single_tile script
print(msg.url())
statement in the single_tile script it gives me a generic line for the entire collection like this:
|DEBUG:SCRIPT: Single Tile URL: |url: [main:/collection2/single_tile_garden#single_tile]|
I get one for each tile, but it’s the exact same message so the counter increases on the left. I spawn 3 polyominos at one time so it gives me 3 statements when I start the scene. With a count that matches the #of tiles for each polyomino (This is an edit to make it more clear).
DEBUG:SCRIPT: Single Tile URL: url: [main:/collection0/single_tile_garden#single_tile]
DEBUG:SCRIPT: Single Tile URL: url: [main:/collection1/single_tile_garden#single_tile]
DEBUG:SCRIPT: Single Tile URL: url: [main:/collection2/single_tile_garden#single_tile]
So the only thing I know is it’s part of collection2. But I don’t have a clue which tile it is.
The real reason I have this issue is when the single_tile has a collision with another tile I want to delete it. And it appears to be random on whether it is deleted or both are deleted or nothing happens.