Cannot call from a table
Hello,
I just started with tables, pretty self explanatory which is why I cannot figure out why this is not working.
Basically I have a row with test in the cells. I have an actor that displays the value in row 1 and col 1 cell. The initial display of the first cell shows ok. I created a rule when tapping the actor the row cell value increases by one. However, it does not update to show the text in following row cells. I created 2 game integers, one for row and one for col, so each tap on the actor increases the value for the row cell by one.
Probably something simple to fix...
Thanks,
Doron
I just started with tables, pretty self explanatory which is why I cannot figure out why this is not working.
Basically I have a row with test in the cells. I have an actor that displays the value in row 1 and col 1 cell. The initial display of the first cell shows ok. I created a rule when tapping the actor the row cell value increases by one. However, it does not update to show the text in following row cells. I created 2 game integers, one for row and one for col, so each tap on the actor increases the value for the row cell by one.
Probably something simple to fix...
Thanks,
Doron
Comments
When touch is pressed (on actor to be tapped)
- Change your row integer attribute (I'll call it 'monkey' as an example) to 'monkey+1'
Now in your actor that displays the text:
- Display text tablecellvalue (table name, monkey, 1)
As you want the row count to go up, you need the monkey attribute with a dynamic value, the column can just be set as 1
Timer - Every 0.5 seconds
Display text - tablecellvalue (table name, row, columm)
It will make your actor every 0.5 seconds get the cell value and display it.
@Tokuhara - I tried a timer but it didn't work.
Thanks,
Doron
I'm not sure I understand exactly what you mean, but here's a quick demo with it working:
https://dl.dropbox.com/u/29198274/Table test.zip
Let me know how it differs from yours. You can also send me your quick mock-up if you want me to take a look
Cheers
Thanks,
Doron