0 Favourites

Create an analog stick at touch ID?

  • This has baffled me for too long and I've probably bumped too many old threads that seemed to have a 'working' solution by now, all to no avail.

    Test it on mobile here and see that touch IDs revert to -1 insanely fast.

    Here is what the event sheet looks like for the left controls:

    <img src="http://i.imgur.com/5NNjUDW.png" border="0">

    ...and for the right controls:

    <img src="http://i.imgur.com/ecKjkin.png" border="0">

    I will share a .capx with any trustworthy members on this forum who are itnerested, but I won't post a .capx publicly due to the possibility of my art assets being stolen.

  • Why don't you just try to write out what you want to do in the off chance touch id doesn't work the way you expect it to?

  • So limit the game to only one touch? No thanks.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Touch has one of largest lists of expressions, and it never occured to you that something else like say touch index might work instead?

  • It looks like your trying for dual analog

    If you can make sense of the tutorial page

    scirra.com/tutorials/398/touch-stick-controllers/page-3

    Also you can download the tutorial capx

    scirra.com/tutorials/398/touch-stick-controllers/page-5

    Hope any of this helps, but the tutorial was created to get touch analog sticks working. Including dual analog. Good luck.

  • Touch has one of largest lists of expressions, and it never occured to you that something else like say touch index might work instead?

    Before suggest to me touch index, please realize that touch index increases based on the number of touches.

    So first touch = 0, second touch = 1, etc.

    But does that really work for an analog stick?

  • It looks like your trying for dual analog

    If you can make sense of the tutorial page

    https://www.scirra.com/tutorials/398/touch-stick-controllers/page-3

    Also you can download the tutorial capx

    https://www.scirra.com/tutorials/398/touch-stick-controllers/page-5

    Hope any of this helps, but the tutorial was created to get touch analog sticks working. Including dual analog. Good luck.

    Thanks. I'm saddened to see this is the ONLY tutorial in the Mobile section of the tutorials site. Are there really only a few people who have multitouch games made with C2?

  • > Touch has one of largest lists of expressions, and it never occured to you that something else like say touch index might work instead?

    Before suggest to me touch index, please realize that touch index increases based on the number of touches.

    So first touch = 0, second touch = 1, etc.

    But does that really work for an analog stick?

    Nope, but it's more relevant than touch id.

    Anyway you need to go from another direction. Try on object touched, or is touching.

    Also please realize that treating people like they don't know what they are talking about does not help your situation.

  • I have tried those. I have spent nearly a full day trying different possibilities with the touch behavior.

    Apparently there is a specific setup you have to use to 'get it right', and I'm still trying to find what that is.

  • touch.index has near 0 relevance to multi touch gaming. it's only possible use is when you specifically want to organize based on a touch system of reducing and eliminating touches on a 0 based.

    I cannot imagine any game where touch.index will be of use that isn't related to music.

    prior to touch.touchID and touch.XYForID it was impossible to do multi touch input. Ashley gave it a try when I pushed subject on the difficulty. Thus now we have touchId. Still appreciate it :)

    and yes excal it is sorta in a situation where you need to just get it right. I spent a month prior to touch.touchid and ForId to get dual analog working. I ended up using drag and drop behaviours instead of touch.index(as that was only natural multitouch available). It worked but it had a funny bit where the DD objects could not be stored in a sub folder for sorting :(

    It's sorted out now.You can have dual/quad/hex/oct analog based controls now :P

    =Group whatever=

    var static tid = -1

    onTouch Hudleft sprite

    tid = -1

    -- tid = touch.touchid

    isTouching hud leftsprite

    tid => 0

    -- do your analog stuff

    -- use touch.AbsoluteXForID or touch.XForId(you need to use ForId)

    endTouch

    touch.touchid = tid

    -- end touch stuff

    -- tid = -1

    maybe you can minimize your capx and share it. I can barely effectivly read the images

  • jayderyu

    What about two analogs?

    What you have above seems to be for a single analog, which I have working. The issue is getting the second analog to appear.

    <img src="http://i.imgur.com/pPoIFAT.png" border="0" />

    And here are the events for the right-hand side.

    <img src="http://i.imgur.com/qql12TR.png" border="0" />

  • Hate to keep bumping this, but getting the multitouch to work is one of the last steps I need to take before I can submit to the Newgrounds Construct 2 game jam.

  • well how about posting you capx. so I can get a hands on look. I can't see what's wrong by images. Yet what I put up is working on my device.

    Also the information of

    * testing device

    * OS

    * version

  • jayderyu

    Here's the .capx: SpaceGame.capx

  • ugg. I'm having troubles with my computer at the moment. I upgraded my router and for some reason I can't preview over LAN at the moment. I will check on it as soon as I have that going.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Pick All / Create Bug
56 1,826
Prominent's avatar
Prominent
Unread hot topic
54 9,997
famekrafts's avatar
famekrafts
Unread hot topic
26 2,326
part12studios's avatar
part12studios