how to move an object with touchevent

0 favourites
  • 8 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • I�m trying to make an object move up, down, left or right when it�s touched depending on swipe direction but can�t make it work. Some help would be very nice.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Really!? no one has any suggestions? I find that hard to believe!

  • Usually providing more information about what you are trying to do is the best way to get a response. For example, why not just use the Drag & Drop behavior? What doesn't it do that you need?

  • ,

    For example:

    Condition:

    On Touch screen;

    Every 0.01 second;

    Actions:

    move sprite 1 pixel toward position to Touch object;

  • don�t have much of a project yet to provide, I just wanted to make something simple to try out touch functions. The idea was to make a small game where you have 8 suqares numbered 1 to 8 in a 3x3 grid, so one square grid is empty, then the task would be to move them around to sort them by swiping on them. The swiped square should only move in the swipe direction if that space is free.

    I tried to use "object touched" in a lot of different combinations but couldn�t make the square move. :(

  • So, simple use the Vertical shoot example of Construct 2, the sample uses the Touch events and a custom movement system made by Ashley or

    If you look inside it, and on all other samples provided with the Construct, you'll learn a lot of how the events works =]

  • Ok I�ll look into that.

    Thanx very much for the help

  • Hi there ... Actually I'm working on something similar. I already calculated the angles(sort of) and assigned it to "directions" for some reason my object is not moving correctly tho... I'm trying to use the grid movement and I need my object to move one square in whatever direction I swipe. I'm having issues with the moving part ... some issue with how I'm implementing the angle "translation" to direction.

    Probably because I'm multitasking at the moment and can't really concentrate on doing this right heheh. But at least its moving when I diagonally assign left and right now if it did it right when doing it side ways it would rock. I burrowed some of this from the "diablo like movement" sample and adapted the touch part. Any suggestions and or fixes are welcome. I hope it helps ... and if you guys have any suggestions or solutions to my issue they are welcome as well.

    Swipe Tile walk Test

    Just to clear it a bit.

    I'm using the text to see what I'm doing also the Blue and red squares are for visual input on my part to see where my touch starts and ends.(they are not being used for anything but visual feedback)

    ----UPDATE----

    After some hammering down on the situation i came to a possible cleaner solution. Here's my Generic Grid Walk I hope it helps for later use.

    Capx

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