How to do +1 in a table

stefdelecstefdelec Member, PRO Posts: 146
Hi,

I just started to use gs, and I am "stuck". I have looked on the forum before, couldn't find my answer or I don't know how to phrase it.

Anyway, I would like to change the value of a cell each time I press a bouton. 1 touch => +1, then anotherpress=>+1 to the same cell. How could I do it?

Thanks,

Stephane.

Comments

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    edited December 2013
  • stefdelecstefdelec Member, PRO Posts: 146
    edited December 2013
    Hi thanks!

    However, I can t see where it is. I checked all the behavior (button) part, I can t see how you did it.
  • stefdelecstefdelec Member, PRO Posts: 146
    What I did: rule (pressed)=>change table value (don't know what to do).

    In your example "change table value" is empty. But it is working.
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    edited December 2013
    I updated the other project to display a note behavior inside the button actor. Here is the explanation

    When touch is pressed change attribute (game.test-tb, 1, 1) to

    tableCellValue(game.test-tb ,1,1)+1

    (game.test-tb [Our Table], 1 [Row], 1 [Column])+1 [How much to increase row 1, column 1 by, in this case 1]

    Edit: Odd that its empty. Here is a screenshot of the change table value
    image
  • stefdelecstefdelec Member, PRO Posts: 146
    edited December 2013
    (i am working on windows).
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    Glad I could help.
  • stefdelecstefdelec Member, PRO Posts: 146
    edited December 2013
    OK i got it!! TKS
Sign In or Register to comment.