get Struct Field by its name?

Hi there…

I ran into a problem when trying to create a simple Autotiling system, based upon Structs.

To Create a Tile based on 4 Subtiles, i created the following Struct to hold the 4 Subtile IDs:

Now, i check Bitwise if a the surrounding Blocks of my Tile are blockable or free. This is working that way:
And results in those 16 Tiles:

Now… my Struct has 16 Fields. Each Filed has a Number as Name (from 0…15).
With the following Blueprint, i´m checking Bitwise for the Blocks, and get a result BIT from 0…15:

The Question is now:
How am i able to GET a Field of my Struct, by its Name?

"Struct get (AutotileStoreBit.ToString)"

Cause all i found via Blueprint is to break my Struct… and this results in:

So, is there a way to Get a Field of a Struct via its name, or/and can someone make me a Node for it if there isn´t one?

thanks for reading :slight_smile:

1 Like

I doubt this is possible in Blueprints. But this should work in your example:


I rightclicked the output of the MapAutotileTable’s Get node to split struct pin (that’s the same as your break Struct_AutotileTable node). And I rightlicked the select node and added as many option pins as needed.

1 Like

Thanks for that late answer :sweat_smile:

But i found a more straight forward solution a few years ago…

Using a Map with strings as keys and the structure as value, works great.
As Autotile linlint, i use DataTables as library for tiles, and thr structure simply holds IDs, keyfields, rownames…etc