Compare actors

WalaskyWalasky Member Posts: 10
edited March 2015 in Working with GS (PC)

Hi guys, how can i compare two actors, for example if i have an oranje, a banana and a apple, and if i touch the correct actor the game have to change to another scene but if the actor is incorrect do nothing.
Im using windows version

sorry for my bad english.


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

    Give each actor an actor attribute of type integer called self.fruit. Double-click on each actor in the scene and change self.fruit to a unique number (e.g. orange could be 1, banana could be 2, apple could be 3, etc.). In the "correct" actor, change game.correctFruit (also an integer) to self.fruit. In the fruit actor's prototype rules, have a rule that says:

    If touch is pressed
         If attribute self.fruit = game.correctFruit
              Change Scene

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

  • WalaskyWalasky Member Posts: 10

    Ok, let me try it, thanks

Sign In or Register to comment.