PlayMaker Help & Tips > PlayMaker Help
Bitmask operations? [SOLVED]
(1/1)
pneill:
I'm using the new navmesh actions and I need to do a bitmask operation to determine if a sampled position contains a certain navmesh layer.
So I'm trying to do a bitmask operation.
At first I tried writing a custom action, but when I tried to do the bitmask operation on the FsmInt variables, I got the error message - "Operator '&' cannot be used with a left hand side of type 'HutongGames.PlayMaker.FsmInt' and a right hand side of type 'HutongGames.PlayMaker.FsmInt'.
Alternatively, I tried to do this operation in an external script, but I then got the following error message - "The best overload for the method 'wayPointFunctions.isBitPresentInMask(int, int)' is not compatible with the argument list '(HutongGames.PlayMaker.FsmInt, HutongGames.PlayMaker.FsmInt)'.
Is there a recommended approach for handling bitmasks?
Thanks!
Alex Chouls:
Use the Value property to get/set the int wrapped by FsmInt.
E.g. lives.Value = 3;
pneill:
Doh!
Worked like a charm. Thanks!
Alex Chouls:
Cool! Perhaps you'll share the custom action on the forums...? :)
Navigation
[0] Message Index
Go to full version