Tap To Play

goonergooner Lancaster, PAMember Posts: 135

Has anyone implemented a "tap to play" on their main menu scene ...

i have seen some games where you tap anywhere on the screen to start (in place of a play button) ...

i tried this by making a transparent actor full size of scene and one layer below all of the other buttons .... but my problem is that even though other buttons are higher on the layer order, both seem to behave as actor pressed if you press on the buttons (if you press off buttons it works fine).

I added a timer for the full screen play to change scene after .1 seconds and that seems to work, but it seems more of a workaround and not a real solution.

is there another way to enforce the layer order?

Thanks for any feedback.

Comments

  • NNterprisesNNterprises Member, PRO Posts: 387

    I do tap to play on some things, I do the transparent layer full screen size on top of everything, and create a boolean attribute called START.

    Then when tap on the full screen, turn START to true

    If START is false, none of the buttons or background things work. So you will have to go into all of your button actors and add a If START is true AND touch is pressed.

  • goonergooner Lancaster, PAMember Posts: 135

    thanks, I'll try it out now

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

    Not that it really matters but there's no need for a full-scene transparent actor. Just place an actor off-scene in the margin and give it a When Mouse Button is Down rule. Or place that rule in an existing actor (e.g. the Play button actor) and there's no need for an additional actor.

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

  • goonergooner Lancaster, PAMember Posts: 135

    thanks for the help!!!

    i am still having conflicting "touches" ... if i touch shop button (even on higher layer) ... i hear two clicks (both play a sound on touch) and it starts the game ...

    when i touch anywhere not a button, it works fine and game starts but i cant seem to get the touch buttons sorted out

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Buttons or actors above each other on layers don't obscure each others behaviors so you have to work around that. I would try what @NNterprises suggested.

  • NNterprisesNNterprises Member, PRO Posts: 387

    I believe you still need the Boolean that I mentioned above. You can do it a bunch of different ways like mine or @tatiang says, or with outher things like touch is OUTSIDE etc.

    But to keep it simple and not confuse everyone:

    Do a transparent layer full screen size on top of everything, and create a boolean attribute called START.

    Then try when touch is RELEASED on the full screen, after 0.1 seconds turn START to true

    Then do what I said before

    Let me know if this works instead

Sign In or Register to comment.