How do I create a touch release

  • How do I create a touch release

    what I want is to create this same but touch:

    I tried to invert the function 'is touching' but does not work well

    sorry by my bad english i talk spanish.

    thanks.

  • Oh so you are trying to make this same thing but instead of keyboard you wanna do on touch?

  • Oh so you are trying to make this same thing but instead of keyboard you wanna do on touch?

    exactly

  • If you are making a game where the object has a built in behaviour, there should be a behaviour event which would suit the case better

    Or you could use the on touch end functions.

    If you have representations of the keys in game you can use a system like:

  • 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 a game where the object has a built in behaviour, there should be a behaviour event which would suit the case better

    Or you could use the on touch end functions.

    If you have representations of the keys in game you can use a system like:

    i do not understand how I can put that

  • try this aproach:

    use dummy sprite (blank, invisible)

    and set it to create on any touch at touch x and y

    than set your events something like this:

    on touched sprite + if dummy is overlaping that sprite + set that sprite variable from 0 to 1 = key pressed action

    and something like this:

    on any touch end + sprite has variable 1 + dummy gets destroyed = key released action

    and then return sprite variable to 0

  • try this aproach:

    use dummy sprite (blank, invisible)

    and set it to create on any touch at touch x and y

    than set your events something like this:

    on touched sprite + if dummy is overlaping that sprite + set that sprite variable from 0 to 1 = key pressed action

    and something like this:

    on any touch end + sprite has variable 1 + dummy gets destroyed = key released action

    and then return sprite variable to 0

    i dont understand

    i put this and not work

  • Start the animation using the object touched event, not the is touching. And use the on touch end to finish, not the 'x is touching'

  • Start the animation using the object touched event, not the is touching. And use the on touch end to finish, not the 'x is touching'

    not work

  • deth123 you need to do a check to make sure that touch 0 was on the object.

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