Math problem with boolean
Hi guys, here's the problem:
I have 10 boolean attribute and 1 integer attribute
I want that the integer attribute is boolean1+boolean2+boolean3 etc, but It doesn't work
for example: If I change the integer attribute to boolean1, the integer become 1
but If I change the integer attribute to boolean1+boolean2, the integer become 0 (even if boolean1 is true and boolean2 is false).
Is it possible to make an addition of boolean attributes?
Thanks !
I have 10 boolean attribute and 1 integer attribute
I want that the integer attribute is boolean1+boolean2+boolean3 etc, but It doesn't work
for example: If I change the integer attribute to boolean1, the integer become 1
but If I change the integer attribute to boolean1+boolean2, the integer become 0 (even if boolean1 is true and boolean2 is false).
Is it possible to make an addition of boolean attributes?
Thanks !
Comments
Could you just use intergers in place of the booleans, having 0 in place as false, and 1 in place of true?
Then you can add those together no problem
I have 94 attribute, so 94 integer are too heavy for the memory on my 3gs
old_kipper's solution is what I was thinking to use.
Is it possible that in previous GS version the addition of boolean worked well?
Ive also never noticed a differnce in memeroy by using differnt attributes types.I have a couple projects i started a while ago that have 500+ interger attributes that run fine.
So i bet your gonna have to change them, you can use index if theres no negative numbers, which take up less memory per say.
cheers