Is A Joystick / Tap Combination Possible

Discussion in 'How Can I...?' started by getschwifty, Mar 9, 2017.

  1. getschwifty

    getschwifty Boxer

    Joined:
    Mar 7, 2017
    Messages:
    4
    Likes Received:
    0
    Hi,
    I'm currently building an avoidance game in which the character moves left and right to avoid objects, for this I've used the joystick control and set the y speed to 0
    However I would like to add a shooting option to my character, I've tried using a character button to shoot when the screen is tapped, the only problem is that I loose all movement since the character button is placed on top of the joystick control.

    Is there any way to combine a joystick and a character button in which they both cover the entirety of the screen?

    thanks in advance
     
  2. FranciscoBala

    FranciscoBala Avid Boxer

    Joined:
    Feb 25, 2017
    Messages:
    161
    Likes Received:
    72
    Dont think they can both cover the screen, but what I did with my shooting flappy game was have the normal "tap to fly" button covering the whole screen, & added another button on the bottom right hand corner in order to shoot..
    Tap to fly covering screen - Shooting button on top the other button :)
     
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hi @getschwifty, welcome to the forum.
    Yes you can combine two buttons on top of each other, but you need to uncheck "Block Through Touch" to ensure you can also touch through your shoot button to activate the joystick. The downside of this method, is you're always shooting whilst moving, but you can probably get close to your ideal, by playing around with how often your bullet spawns. Play around with the spawn rate.

    Here's BBDoc for you to have a play around with:
    https://www.dropbox.com/s/i7l4momlc3jojat/Joystick & Shoot Combi.bbdoc?dl=0
     

Share This Page