"touch" on buttons not working properly

fstltnafstltna Member Posts: 96
edited November -1 in Working with GS (Mac)
I have had to switch to using keypad actions while testing as the "touch" reception does not seem to be working right. If I have touch enabled some buttons (not all) will trigger no-matter where you are clicking on. It can be another button (with its own action) or blank space in the window.

I have tried flipping them "to front" but that doesn't seem to do anything.

Please help!

Marisa

Comments

  • specialist_3specialist_3 Member Posts: 121
    Is your button an image? If so, does it have empty (blank/transparent) pixels which overlaps with other actors? You may want to "TRIM" that image in a image editing software to remove those blank pixels.

    Where have you placed your Touch rule? It should be placed only within the button actor you are pressing.

    Maybe your iphone has lost some sensitivity? Is your touch working properly with other applications?
  • fstltnafstltna Member Posts: 96
    I haven't tried it in the real ipad, just using the preview. The buttons are images, and do have a few transparent pixels at each corner but I don't think they are overlapping. As I said for the buttons this is happening to I can click anywhere and they will trigger. What happens with transparent pixels if they do overlap?

    My touch rules are strictly within the objects being tested for..

    Marisa
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi ftitna, perhaps try a small test by moving the button images well away from each other temporarily, to see if it works then. If not, temporarily remove the background if there is one, and try again. If it works second time, you might have a touch rule in the background image?

    Any touch rules will "bleed through" to underlying actors, I've found; as specialist_3 wrote, you have to make sure they are isolated from other actors (buttons), and even the background sometimes.

    There is a solution depending on the problem, that's to put items in separate layers; that way any touches can't affect each other.

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • fstltnafstltna Member Posts: 96
    I tried removing the background actor (no change) and the text title actors. I will try moving a button out into the middle of the area and see if that makes a difference....

    How do I do the separate layers?

    Marisa
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    fstltna said:
    I tried removing the background actor (no change) and the text title actors. I will try moving a button out into the middle of the area and see if that makes a difference....

    Hi Marisa, good luck with that.
    fstltna said:
    How do I do the separate layers?

    If you press the Scene button in the Scene Editor, there are the layers. Click the + sign to make another. You can open each layer folder to drag items between them. Hope that helps!

    PS Ideally though, you'll want to keep your buttons in the same folder really, so hopefully your experiment will work, and you can adjust accordingly. It's strange to me that even when the background is deleted, the press works on the black background, activating the buttons. Have I understood correctly, and if so, which button is it activating i.e which level do you go to? (Presuming they are menu buttons).

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • fstltnafstltna Member Posts: 96
    There are several buttons, and when enabled for touch they all activate at once nomatter where i click. i will try the button move and see if it helps...

    Marisa
  • fstltnafstltna Member Posts: 96
    I removed the background actor & layer and tgried it again but it didn't make any difference. I checked the layers area and all of my attributes are in seperate layers one each. Is there somewhere I could post my game so someone could look at it and see what I am doing wrong? I am a little over my head with all I need to do to get it going...

    Marisa
  • firemaplegamesfiremaplegames Member Posts: 3,211
    What is most likely happening is that in one of your Rules somewhere, you have 'mouse is Down' instead of 'Touch is pressed'.

    Mouse is down works everywhere on the screen whereas touch is pressed works only on the actor.

    Also, make sure that all of your code is only on actors in the library. If you double click on the actors in the scene window, make sure they all have padlocks on the right side.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I'm guessing that your buttons are all instances of the one actor? And that you've got your Display text actors on top set as alpha=0? If not different text actors but the buttons instances of the same actor, try a different actor for each of your button names; delete the rules in your buttons, and put the Rules in the actors holding text. You can put the background back as well, and I'm sure that'll all work out for you. I hope!

    :-)

    Edit: writing while firemaplegames was writing

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • fstltnafstltna Member Posts: 96
    Thanks firemaplegames! That was the problem. Some of the buttons had the mouse-down trigger set and as I cut & pasted them it got replicated around. I didn't know that mouse-down was for the whole window and not just the actor!

    Thanks again for all your help you guys!

    Marisa
Sign In or Register to comment.