How do I use touch / Ifelse?

0 favourites
  • 3 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • I'm super new to the tool and am currently trying to get some sort of hello world going. But I am struggling big time. In the first scene, tap works fine and the scene transition works. However, in the second scene, tap object does nothing (I want it to get to another animation, essentially highlighting it). Also, I wanted to revert back to the original frame 0 when it is not being touched, I was thinking of an "if being touched (frame = 1) else (frame = 0)" kind of logic. But I cannot add an else statement to the touch object condition.

    I came from a C background so any general advice is also appreciated.

    Also is there a shortcut to fit the scene on my screen? I'm currently just dragging objects around and previewing them to see how they fit.

  • First up, avoid using gestures - they are kinda finicky and not very responsive. I'd recommend using the conditions under "touch" instead.

    You can't put else after a trigger, but you can after a normal condition like "is touching object" ('x' is the shortcut to create an else event). However, note that you won't want it as a subevent of event 2 the way you have it now. Since touching the sprite will set the animation to 1, event 2 will no longer be true and it's subevents won't run.

    Alternatively, since the entire event sheet will run every tick top to bottom, you can do something like 'every tick - set animation to 0', and after it, have your event that changes it to 1 when touching the sprite.

    What do you mean by fitting the scene on your screen?

    The viewport, within the dotted line, will be your visible screen when exported. You might need to zoom the layout editor out to see it (shortcut: ctrl-mousewheel), since you've set it to be about the same size as a normal monitor's resolution.

    As for general advice... read the manual.

    It's actually not that long! At least read up through the tips and guides sections, the rest of it is just references and details for how all the behaviors and plugins work. I've found the documentation for Construct to be fantastic in that it's very clear, concise, and complete.

    For a more hands on introduction, follow the official beginners tutorials. There are two, and I'd recommend going through both of them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you are making lets say "buttons" and you want them to be visible all the time, you would do a new layer, and change the parallax property of that layer to 0,0 , that means everything in there, will stay at the positions they always have.

    For background, using parallax 10,10, would make the background move only ALITTLE, like its very far away.

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