GameSalad

Touchscreen movement

tovamoxie1998tovamoxie1998 Posts: 3Member
edited March 6 in Community Tutorials

I'm new to all of this so please bear with me on this. (sorry if this is in the wrong spot)
I am trying to make a game with movement similar to flappy bird.
I need to make the actor move up and to the left when the left side of the screen is tapped/click, up to the right when the right side of the screen is tapped/clicked, and straight up when the middle of the screen is tapped/clicked.

Thank you everybody for your help in advance :)

One more dumb question, the white lines inside the black box when you start a new project, do those represent the screen size of the iphone?

Comments

  • ToqueToque Posts: 618Member, PRO

    Welcome. There are Many tutorials that will help you get started.

    Here is one about flappy birds.

  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,241Member, BASIC
  • tovamoxie1998tovamoxie1998 Posts: 3Member

    Thanks guys!
    Now is it possible to split the screen into 3 parts (left, middle, right) and have each one of those trigger a different direction?
    I'm in portrait mode btw

  • tatiangtatiang Posts: 10,529Member, Sous Chef, Senior Sous-Chef, BASIC

    @tovamoxie1998 said:
    Thanks guys!
    Now is it possible to split the screen into 3 parts (left, middle, right) and have each one of those trigger a different direction?
    I'm in portrait mode btw

    Yes. You can add a rule condition for the touch's X position in addition to the fact that a touch occurred (e.g. When Touch is Pressed). So you could then do something different based on where on the screen the player touched (e.g. x<300, x≥300 and <600, x≥600).

  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,241Member, BASIC

    In addition to the method @tatiang mentions, you could also create 3 (or more) invisible buttons that cover each 1/3 of the screen and then use those buttons to trigger your actions. You can make actors invisible to the eye by reducing their Alpha value to 0. Those actors will still be on screen and able to perform like any other actor, you just won't see them.

  • tovamoxie1998tovamoxie1998 Posts: 3Member
    edited March 6

    Edit
    Found the answer, thank you guys for your help!

Sign In or Register to comment.