Blutility - Construction script and mouse input

I’m gonna try make this short, I’m currently making a grid based strategy game using 4.17.2. The grid consists of one actor that spawns every tiles in its construction script. In addition to that every tile can be modified via several arrays (i can delete, rise, lower, add resources and building on any specific tile). I was looking at ways to easily select individual tiles (which are the actor’s components) in editor.

So I managed to make a blutility blueprint that lets me customise the grid. I have a range of “Call in editor” functions that get the position of the camera and line traces down to the grid to select individual tiles (by casting to the grid I can get the hit components) and edit corresponding arrays. However, sometimes when I edit the grid, it won’t re run its construction script until I manually open its blueprint and compile it.

Do you know if there is any way to run or refresh a construction script through blueprints?

I was also wondering if there was any ways to get mouse input (buttons would be awesome but simple conversion from screen to world of the coordinates is enough) within a blutility blueprint?

I know I can get the mouse’s position on viewport but I can’t convert it to world space without a player controller. I tried looking at ways to calculate it manually but from what I understood I need the camera’s matrix which I don’t know how to get in blueprints.

The pictures simply shows the blutility functions, the linetrace down and some of the tile customisation. I know blutilities are still experimental but I’m really curious of its capabilities. Sorry if this was too long to read, I couldn’t think of otherways to explain myself …

You probably should convert your construction script to a function/macro that is called in the construction script, and recalled when you detect mouse input

I thought of that, but my construction script has a lot of local variables which would be a pain to move over. I want to keep that option as a last resort type of thing aha

Have you tried the collapse to macro/function? It was a long time ago since I did BP, but perhaps it takes care of it for you.