Bit Flags in Blueprints

Ok, so in this project that I am working on I would love to use bitflags but I’m not sure how to go about doing that. The idea is that I need to be able to tell if a monster can fight in the air, water, land, or any combination of those.

I want to store all information about the different types of monsters in a data table filled with structs. So within the struct I need some way to store their terrain preferences in combat. I.e. 001 is land combat, 011 is land and water, or 101 is air and land.

In C++ it would be a very different matter, but we’re just doing prototyping in Blueprints right now and don’t want to jump into that yet.

It is quite straight forward, just have a look at the docs
https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/Variables/Bitmask/index.html
it is simple as ticking the “bitmask” box in an enum with you air,water,land and an integer

Right but then, for that integer the article mentions, can I put that in a struct? When you add an integer to a struct you aren’t able to check that bitmask checkbox.