Boolean in tables? What's the use? My workaround, What's yours?
I'm not sure what the use of a Boolean in the table is for right now.
This data can not be accessed in a direct manner.
Example: I want to mark that an item has been bought, so i click the Boolean in Table1 Row1 Column1 to TRUE.
Yes. I can change the value using the "Change Table Value" behavior in the game, when bought.
Now I want to use a rule to find out if that item has been purchased.
i can not say "If Table1,Row1,Column1 is TRUE, then......". I wish I could, but the way the rules are set up, I have to enter a solid attribute FIRST, and then compare it to another attribute value, or equation, etc. But the FIRST box is only an Attribute.
so I can say if Attribute Thingy = Table1,Row1,Column1, then.........
but I can not say if Table1,Row1,Column1= TRUE, then.........
Does anyone know a workaround for this?
Right now, I am Creating 2 gameLevel attributes (2 booleans), 1 set to TRUE, and 1 set to FALSE, and using that.
RULE: If TrueBooleen (which is set to true) = Table1,Row1,Column1, then.......
RULE: If FalseBooleen (which is set to false) = Table1,Row1,Column1, then.......
This is a common problem I found with the basic way that RULE is set up. I wish both sides could have equations.
RULE: If Speed+Weight > 50 then......... Right now, i have to create an attribute XX. change XX = Speed+weight.
Then My rule looks like this: RULE: If XX > 50 then...............
This data can not be accessed in a direct manner.
Example: I want to mark that an item has been bought, so i click the Boolean in Table1 Row1 Column1 to TRUE.
Yes. I can change the value using the "Change Table Value" behavior in the game, when bought.
Now I want to use a rule to find out if that item has been purchased.
i can not say "If Table1,Row1,Column1 is TRUE, then......". I wish I could, but the way the rules are set up, I have to enter a solid attribute FIRST, and then compare it to another attribute value, or equation, etc. But the FIRST box is only an Attribute.
so I can say if Attribute Thingy = Table1,Row1,Column1, then.........
but I can not say if Table1,Row1,Column1= TRUE, then.........
Does anyone know a workaround for this?
Right now, I am Creating 2 gameLevel attributes (2 booleans), 1 set to TRUE, and 1 set to FALSE, and using that.
RULE: If TrueBooleen (which is set to true) = Table1,Row1,Column1, then.......
RULE: If FalseBooleen (which is set to false) = Table1,Row1,Column1, then.......
This is a common problem I found with the basic way that RULE is set up. I wish both sides could have equations.
RULE: If Speed+Weight > 50 then......... Right now, i have to create an attribute XX. change XX = Speed+weight.
Then My rule looks like this: RULE: If XX > 50 then...............
Answers
Instead of bool, make it int (integer). 0 or 1. if 0 = table 1 row 1 column 1.
OR
if 1 = table 1 row 1 column 1.
- 5227
... brings me back to my first question:
What is the use of Boolean in Tables?
For example, if you wanted to check if your boolean was true, create a game.Boolean attribute, constrain it to the target you want to check against and create a rule on touch that says if game.Boolean = tableCellValue(table,row,col) then do whatever.
So although we cannot put a table cell into the attribute slot of a rule, we can constrain an attribute to that specific table, and check if that constrained attribute is whatever. I dont see why you need another workaround, as this works fine.
If you put a Boolean attribute in the first box in a rule, the second (comparative) box will automatically switch to a true/false selection box, so you can not compare 2 booleans to each other.
You can, however, get a text result from a table with a boolean. Table,row,col value display.
I'm going to see if I can have a text attribute, and compare it to the boolean in the table. I know I can display the value using display text, but I'm not sure if that translates over to a text value.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS