cycle through 3 images

superbulletsuperbullet Member Posts: 56
edited November -1 in Working with GS (Mac)
Hi all just wondering if anyone could help me.
I have 3 images and i would like to to cycle through them by pressing arrow buttons on either side of the screen. I'm trying to make a 3d room effect like the escape room games
example:
Press the button left : left image
Press the button right once : middle image
Press button right again right image.

Thanks in advance

Comments

  • jb15jb15 Member Posts: 602
    There are many ways to do this. Here's the (IMO) easiest way--although this may not be the best way, it's very simple:

    Create three boolean attributes:
    FacingLeft
    FacingRight
    FacingMiddle

    In your LEFT button, put When touch is pressed:
    Change Attribute FacingLeft to TRUE
    Change Attribute FacingRight to FALSE
    Change Attribute Facing Middle to FALSE

    In your RIGHT button, put When touch is pressed:
    Change Attribute FacingLeft to FALSE
    Change Attribute FacingRight to TRUE
    Change Attribute Facing Middle to FALSE

    In your MIDDLE button, put When touch is pressed:
    Change Attribute FacingLeft to FALSE
    Change Attribute FacingRight to FALSE
    Change Attribute Facing Middle to TRUE

    Then in your actor that changes images put
    When FacingLeft is true > change image > your left image
    When FacingRight is true > change image > your right image
    When FacingMiddle is true > change image > your middle image

    ___________________________________________________________________________________
    One Touch Ninja Platformer Template
    Red Bouncing Ball Template
  • superbulletsuperbullet Member Posts: 56
    Awesome! thanks
Sign In or Register to comment.