Need Random Image to Stop when Clicked

I am using a timer and random function to display a random image every few seconds for 1 actor. I want to put in a rule when actor is touched it remains on the current image showing. How can I do this??

Thanks for the help.

Comments

  • JRRCJRRC Member, PRO Posts: 27

    You can have an integer or boolean attribute inside the actor which, when true, activates the random image behaviour. Then you can setup a rule inside your actor so that when you press it it changes that boolean to false, that way it should keep changing images until you press it =)

  • SocksSocks London, UK.Member Posts: 12,822

    When touch is pressed > nothing

    Otherwise > every few seconds > change image to random.

  • SocksSocks London, UK.Member Posts: 12,822
  • rdvd83rdvd83 Member Posts: 11

    I created a Boolean attribute and it worked...sort of. I have several actors with random images and I only wanted the one being touched to stop on that image. With the Boolean attribute, when one is touched, they all stop.

    How can I work it out so only the actor being touched stops being a random image and stops on the current image???

    Thanks for the help.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    The boolean attribute needs to be a self (actor) attribute rather than a game attribute, which has the same value for every actor.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.