problem with rows
KanaSpeed
Member Posts: 4
Hi guys, I have a table with 1 column and 20 rows, I would like to know how I can + content of each row
example: row 1 + row 2 + row 3 ....... + Row 20 = X
and then match the result of X = a number in this case 60.
If X is = 60 result is Perfect.
thanx.
example: row 1 + row 2 + row 3 ....... + Row 20 = X
and then match the result of X = a number in this case 60.
If X is = 60 result is Perfect.
thanx.
Comments
gameAttribute: index type … name it X
on the actor that controls the addition
attribute: index type … name rowCount
Rule: when
condition for when rule should fire
-either one of these behaviors
for random:
changeAttribute: rowCount To: tableCellValue(table,random(1,tableRowCount(table),1)
for sequentially:
changeAttribute: rowCount To: rowCount+1
-changeAttribute: game.X To: game.X+tableCellValue(table,rowCount,1)
Rule: when
Attribute: game.X = 60
-do this
=
in computing you add to a value by changing its value To: itself+additionalValue
you will not need a table … when the player is selecting the value to add
just change game.X To: game.X+selectedValue
MH