swap(tileA, tileB, x, y, width, height, layer)
Scans the given area for tiles with an index matching tileA and swaps them with tileB.
Parameters
Name Type Argument Description tileA number First tile index. tileB number Second tile index. x number X position of the top left of the area to operate one, given in tiles, not pixels. y number Y position of the top left of the area to operate one, given in tiles, not pixels. width number The width in tiles of the area to operat