playMaker

Author Topic: (Scripting) Trying to make a compound array for a bit-flag action set.  (Read 1650 times)

Red

  • Hero Member
  • *****
  • Posts: 563
I have been thinking on doing this for a while... Since I learned last night that what I had in mind had an official term and process to do it I though now's as good a time as any since any FSMs that I'd put together to either encode or decode a bit-flag integer from a collection of booleans was massively beastly and a terrible headache to keep track of.

So, what I'm wondering here is... The approach I'm thinking of is to use a similar kind of approach that the "Int/Float Switch" actions do and have the user input how many values the bit-flag will represent and present them with that many boolean values to use. (I understand that it would require precision on their part to know how to set it up so that no values are being lost or the result isn't being truncated.)

But when I try to apply a similar structure in the action, I get error CS1729 saying that I cannot make a system like this that only outputs one variable.

I think I can grok why... I suspect that the method (that's what it's term is, right?) is the incorrect one... So, what sort of actions would you suggest I take a look at to decipher how to make the action populate X number of boolean variable slots dependant on the integer that they say they need (eg: "I need 6 slots... so, put '6' in the field and it'll give me 6 slots to use.")

Red

  • Hero Member
  • *****
  • Posts: 563
Aaah, got it (I think.)

Checked the "Bool All True" action. That's given me the direction needed in this one.

Thank you for your eyes regardless. ;)