I suppose you have a GeneratorBP which spawns the tiles. If not, you should propably change your System and do so, as this makes you more flexible. You need 2 ForEach Loops for this and basic understanding of loops. I assume that you know how to set the Loops up, and if not, I can give you an example. Anyway, in the TileBP create 2 Variables and name them something like “HeightCoordinate” and “WithCoordinate”. You could also use an Array, but I think it’s easier to use 2 Variables. After you spawned the TileBP, access the Variable and give it the Value of the Index of the ForLoop.
If I missed something or I didn’t describe it properly I can make the 2 BPs. And as Plaxa said you have to call the function “get hit under cursor”, cast the Actor-output to your TileBP and access the Variables.
There is another way to achieve this, which basically does the same thing but uses a function “snap to grid” or something like this.