HOW TO MAKE FORWARD AND BACKWARD BUTTONS!!!!

I am making an iPhone game and you have to press some buttons to roll right or roll left. However, I have NO IDEA how to make buttons that when pressed, change the speed or velocity of OTHEr actors. PLEASE HELP!!!! D:

Comments

  • ShmirlyWhirlShmirlyWhirl Member Posts: 189
    There are a few ways to do this.

    One method would be to have Global Attributes, let's call them left and right.

    Put this rule in the buttons:
    If actor receives event Touch Is Pressed
    Change Attribute game.left to true

    Otherwise:
    Change attribute left to false

    Put the same rule for the right button, but obviously change left to right.

    Then in any actor that you want to move

    When attribute game.Left is true
  • VGXVGX Member Posts: 796
    Go to deepblueapps.com there are loads of free and paid templates with this.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    As @ShmirlyWhirl suggested, you use game attributes to communicate between actors. This tutorial I've created may be of use to you (find more by clicking the link in my signature):

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

Sign In or Register to comment.