Touch Fails in the Website LAN Preview.

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter about "Decision Science" strategy games from the "Construct Starter Kit Collection" workshop.
  • Touch fails to work properly. When I am using the mouse on my computer, everything works without a hitch.

    When I click around, i am only able to click what is visible. That is the idea.

    When I have touch however, in the LAN preview, im tapping the screen and touching things that are invisible! What is going on? Buttons on Layers that are not visible. When using the mouse, not once did I click invisible objects on other layers.

    Now, in the LAN Preview, im tapping and interacting with invisible objects!

    Also, buttons don't work. I have tried On Tap Object, Is touching, and On touched Object.

    All to no avail.

    With all three of those, when i tap, i tap invisible objects. Why is it with one input, the mouse, that does not happen? I do not want to interact with insivible objects on the other layers. I had no issues with the mouse.

    So why all of is a sudden is tapping interacting with invisible objects on other layers?

    And why are buttons failing to work? I tried On tap object, is touching, and on touched object. none of those are working.

  • Basically, I tried 3 touch functions. All interact with invisible objects on other layers. Wheras the mouse did not do that.

    and with all 3 touch functions, buttons are not working. even though the functions say: On tap object, is touching, and on touched object.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Any help would be much appreciated. The Mouse input worked without a hitch. No matter where I clicked, i never clicked on Invisible objects. Invisible objects were only interactable when they were visible. Thats the idea.

    Buttons worked as well. Clicking buttons worked.

    Now, im trying to test the game, since its on a mobile device i need to tap to interact.

    Except all 3 touch objects (on tap, is touching, and on touched object) interact with invisible objects (which was not a problem with the mouse) and all 3 touch objects do not work with buttons. i tap the button, it does the default tapped animation, but nothing happens.

    I read on Scrria's site that the LAN preview is the BEST way to preview a game. unless the the touch object does not work with the Preview and I just need to export it like normal to test it.

  • *PROBLEM SOLVED*

    Hold the presses!

    Clicking is a function of a mouse.

    I went back and tested it. My code, before i inserted touch, had buttons triggered "On Click." So I ran it with that code and it worked!!

    It makes no sense, but i'll take it. When the code for buttons says "On Clicked" they work.

    Oh, and no tapping invisible buttons.

    "Clicked" is what mouses do, but i'll take it.

    So long story short:

    For mobile devices and buttons "On clicked" is what is needed.

    For sprites, it is "On Touched Objects."

    BUTTONS: On Clicked allows you to click the buttons and also NOT interact with invisible buttons.

    SPRITES: What you need is "On Touched Objects"

    ^ For Mobile Devices.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)