Here’s a working solution of swapping 2 objects:

Scene variable setup:

Events:
Scene setup:

Note, each GridCell and Flower object have the origin moved to the centre, The editor grid cells are 40 pixels apart, hence the distance <= 80 check in the events.
FlowerGroup is an object group with all the Flower objects in it:

