How to "loop" menu items, so that the scroll order would be 1 - 2 - 3 - 1 - 2 - 3 ... etc.?

Hi there!
I have the main menu of the game with 3 elements in it,
these elements should be scrolled horizontally.
How do I "loop" menu items, so that the scroll order would be 1 - 2 - 3 - 1 - 2 - 3 ... etc.?
And vise versa, if scrolling in other direction it should be 3 - 2 -1 - 3 - 2 - 1 etc.


Thanks in advance!
Vlad

Comments

  • POMPOM Member Posts: 2,599
    To make a "repeat" counter:
    Make an integer call it "menu count"

    Now make a rule in your actor
    When touch is pressed:
    Change "menu counter" to (menu counter+2)%3

    This will make it count 0,1,2,0,1,2...
    Then base your rules on these values.

    Roy.
  • utroutro Member Posts: 1
    Thank you!
Sign In or Register to comment.