Touch to move

0 favourites
  • 6 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • Good day, people.

    Something that may be apparently simple, but anyone got any idea on this?

    I'm trying do something like this:

    (pseudo-code)

    touch the button;

    object begins to move horizontally;

    touch the button;

    object stops moving;

    What I'm tying to do does work with key down, mouse down or "is touching", but I want it to be:

    touch to start moving and then touch to stop moving.

    I tried doing this with 8-direction and platform

    Any ideas? Thanks.

    A sample capx is attached.

    dropbox.com/s/uda716mvf6pb789/moveExample.capx

    Thank you all again.

  • You are nearly there already ^^

    One thing to change only : don't set the bullet speed to 10, set it to (10-joe.Bullet.Speed).

    This way, if you are already moving, you will stop, and if you are not moving, you will start :)

  • Thank you. Thanks very much.

    Truth be told, I continued working on it and the bullet method came to me. Originally, I couldn't get it moving at all. Checking the reply, I wondered what you meant, because my original post was this:

    dropbox.com/s/uumuqta2imbhlwo/originalMoveExample.capx

    My mistake? I was saving to my dropbox as I was working.

    And thank you very much for the bullet speed tip.

    Great.

  • KMOBridge

    Hey again !

    I worked on your dropbox link, and there was already the bullet behavior, yes.

    You seemed to have some difficulties with the diferent controls though, and what you described could have been done with a lot of behaviors, like 8 directions, custom movements or bullet. I did all 3 in this example capx, with a menu to change the input type. Take a look at the event sheet to see how to use each controls well in you case.

    If you have any questions, don't hesitate to ask !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Guizmus:

    Thanks, I'll have a look ar this, and get back to you.

  • Guizmus:

    Just looked at your solutions.

    Amazing.

    Thank you.

    I Had wondered about functions, but didn't know where to start.

    Thank you ever so much.

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