Cannot call from a table

karuzokaruzo Member Posts: 35
edited August 2012 in Working with GS (Mac)
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

Comments

  • ChobbifaceChobbiface PRO Posts: 491
    edited August 2012
    I haven't tested, but from the top of my head, are your rules something like this?

    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
  • TokuharaTokuhara Member Posts: 94
    I think you need to put a timer in the actor to display cell values like this:

    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.
  • karuzokaruzo Member Posts: 35
    @Chobbiface - I had the same exact thing you were showing just I had display text of an game text attribute that equalled the the integer for table row cell value. I changed the display text to the actual formula of tablecellvalue (table name,row+1,1) just like you typed.
    @Tokuhara - I tried a timer but it didn't work.

    Thanks,

    Doron
  • ChobbifaceChobbiface PRO Posts: 491
    edited August 2012
    @karuzo

    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
  • karuzokaruzo Member Posts: 35
    @Chobbiface - thanks for the file - and of course it is working. Checked it and it seems I had it originally setup like that. Not sure why it didn't work for me. Sure I messed up on something.

    Thanks,

    Doron
Sign In or Register to comment.