Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Number Order by Click Order Problem

mmzbrmmzbr Posts: 308Member
edited March 2012 in Working with GS (Mac)
Hey guys,

I'm trying to make a logic that when I press a button a number appear but following a order (1-2-3-4...) based on click.

Here a example:
User press the first button (first position ), then the second button (fifth position)

Now scene was reseted, user press the first button (third position), then the second button (second position)

Could someone help with the logic behind it?

Best Answer

  • simo103simo103 Posts: 1,331Member, PRO
    edited March 2012 Accepted Answer
    @mmzbr ..

    need to create a Game attribute Game.ClickCount

    In all actors:

    then when actor is touched change:


    need to create a self attribute integer "What number am I".

    Rule 'self.What number am I" equals Game.ClickCount.


    Also need a rule to set them back to zero


  • calvin9403calvin9403 Posts: 3,190Member
    make an attribute button pressed? int 0

    when touch is pressed display text attribute+1, THAN change attribute to attribute+1
  • mmzbrmmzbr Posts: 308Member
    edited March 2012
    @calvin9403 I've tried that but didn't worked, when you press a button its change the value in all buttons every time you click on. I have to keep first 1, then when I press the second , the first button value have to be 1 and second 2.

    But thanks for your reply.
  • mmzbrmmzbr Posts: 308Member
    edited March 2012
    Using your logic and made some adjusts now its working as intent. Thank you very much!
  • simo103simo103 Posts: 1,331Member, PRO
    @mmzbr .. excellent. I played a round with a quick demo .. so if you want to compare .. it is on this page on the right titled 'Touch Count Demo' ... I added a Reset and a USED attribute so you can't click the same spot twice:
This discussion has been closed.