How do I switch between platform directions?

0 favourites
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • marcoscodas for that you could do it like so

    is touching button then move right else

    not touching button move left

    This is actually a pretty cool idea. I've actually compiled an Android export and have been finding that touch controls are not responsive enough as they are for the original concept. I may give this a go.

    Thank you for the idea!

    By the way, whatever idea I end up using, I'll credit whoever helped me with it in the final game. It's only fair

  • I cant code/test this at the moment, mobile things are all taken.

    What about.

    Touch > Is in touch

    ____Touch > Has Nth touch ... Nr = 1 <---- INVERTED

    ____System > trigger once while true

    ____________Action simulate Jump

    ____Touch > Has Nth touch ... Nr = 1

    ____System > trigger once while true

    ___________Action > player > Set Vetor X ... to .. Self.Platform.VectorX * -1

    1 finger = jump

    more then 1 finger = switch direction

    should not lag at all

    I think, out of da head.

  • I can code/test this at the moment, mobile things are all taken.

    What about.

    Touch > Is in touch

    ____Touch > Has Nth touch ... Nr = 1 <---- INVERTED

    ____System > trigger once while true

    ____________Action simulate Jump

    ____Touch > Has Nth touch ... Nr = 1

    ____System > trigger once while true

    ___________Action > player > Set Vetor X ... to .. Self.Platform.VectorX * -1

    1 finger = jump

    more then 1 finger = switch direction

    should not lag at all

    I think, out of da head.

    Hmmm you think? There will be moments when these inputs will have to be made almost immediately.

    Also, I'm doing my checks for change of direction every tick. Maybe that's screwing up with the lag?

    Here's my code so far:

    Here's the capx: https://www.mediafire.com/file/hs6exaa5eaohw6u/leftright.capx

    If you want to sideload the APK and give it a shot on the phone without having to compile, here it is: http://www.mediafire.com/file/x38sr4kvo ... elease.apk

    99Instances2Go et al, have at it.

    Feel free to try something that works better and post back.

  • Most welcome

  • You do not need every tick

  • You do not need every tick

    What would you suggest, Lordshiva1948 ?

    I did try a few other solutions but they weren't working for me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry not able to help you as I am waiting for my hospital appointments

  • Sorry not able to help you as I am waiting for my hospital appointments

    I'm sorry to hear that! I hope everything goes well and you get better soon <3 thank you for the help anyway!

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