How do I simulate platform behaviour on mobile

0 favourites
  • 11 posts
From the Asset Store
Wanting to do a Shot n Run game easily? Here is your chance!
  • I am currently using arrow keys and spacebar to move my player on desktop.However i can't do the same on mobile.For e.g when a user press up and arrow right on desktop , the player jumps to the right.

    I can't seems to achieve the same for mobile ?

    Can anybody help me fix this

  • Try Construct 3

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

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

    Couple of things - may be better to have controls in their own group (desktop, mobile) and if on mobile - System create object > up, down, etc. etc.

    Why only a space bar on mobile to jump? Better to separate the arrows - left/right on left side of screen - up/down on right side, since the spacebar sprite only jumps on mobile.

    This way you can easily manage the events/actions - touch right - move right. touch up - jump. Easy peasy.

    Also, mobile controls are very small, and collision polygon should be a bit larger than the actual arrow. Difficult to get him moving on mobile. I kept missing the buttons.

  • I tried this earlier , i can't make the player jump well i think its because of multi touch.Basically if i want to jump right , i press arrow up and right simultaneously but this doesn't seems to work on mobile

  • If you can modify the capx that woul;d help , all sprites are already in file

  • kab

    Question- what is the instance variable 'direction' on hero for?

  • kab

    I think the problem was right in front of me.

    With the left/right movement - change 'On Touched' arrow to 'Is Touching' arrow

    Let me know if that works. If not, i'll send you the capx.

  • jeffige its already to is touching for me ... 05da37.png

    You can also change the position of the buttons as you said above but i want the space button to make the character run faster(check for keyboard event.It was a mistake on my part

  • kab

    The problem with that is - you had it 'touching spacebar' to run faster on desktop. Not on mobile.

    And you can easily add a different sprite, like a lightning bolt next to the jump button for extra speed.

  • kab

    check your messages. sent you a pm.

  • jeffige i don't have the same version of construct2 as you ....could you please send me a screenshoot to highlight your changes

  • kab

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