Suppose I create a bitmask blueprint enum, with values ValA, ValB, ValC and ValD.
Now, I want to keep a bitmask variable that contains zero or more of these bits set.
I can't figure out how I'm supposed to do this.
There is something called a bitmask integer.
I can specify my enum as the "type" of that bitmask.
There is a "Set" operation for this bitmask where I can choose one of the various bit values.
However, if I already have one of the enum values, how do I set that into the given variable?
I can convert-byte-to-int, and then route that into the bitmask-set-node, but the value of "ValD" is actually 3, not 8 as I would expect.
Does "Set" for a bitmask value do the appropriate left-shift for me?
It doesn't seem like it to me. The value of the bitmak integer is "3" after the SET, not "8."
Is casting enum byte to integer what I should do?
It would seem like enum bitmask "Union" and "Intersect" and "Disjoint" operations would be great Nodes to have.
"I have these bits, add them to those other bits over there." (OR)
"I have these bits, remove them from those other bits over there." (AND NOT)
"I have these bits, only keep those other bits over there that match." (AND)
Now, I want to keep a bitmask variable that contains zero or more of these bits set.
I can't figure out how I'm supposed to do this.
There is something called a bitmask integer.
I can specify my enum as the "type" of that bitmask.
There is a "Set" operation for this bitmask where I can choose one of the various bit values.
However, if I already have one of the enum values, how do I set that into the given variable?
I can convert-byte-to-int, and then route that into the bitmask-set-node, but the value of "ValD" is actually 3, not 8 as I would expect.
Does "Set" for a bitmask value do the appropriate left-shift for me?
It doesn't seem like it to me. The value of the bitmak integer is "3" after the SET, not "8."
Is casting enum byte to integer what I should do?
It would seem like enum bitmask "Union" and "Intersect" and "Disjoint" operations would be great Nodes to have.
"I have these bits, add them to those other bits over there." (OR)
"I have these bits, remove them from those other bits over there." (AND NOT)
"I have these bits, only keep those other bits over there that match." (AND)
Comment