Character jumping and swipe controls

NNterprisesNNterprises Member, PRO Posts: 387

Hello,

My background:

I am brand new to GameSalad. I have gotten basic commands and concepts and watched multiple tutorials, but I still need some assistance with specific things, commands, attributes, etc. I have full access to all paid membership options.

My Goal:

I am trying to create an infinite runner where the actor jumps when the user swipes upward on the touch screen (up arrow on HTML), and slides when swiping down (down arrow).

Current Issue:

First off, I am trying to accomplish this using the touch and move behaviors, due to my lack of experience. If there is a better way, please let me know.

Currently, when I click and hold on the character, he moves up (slowly, but does not stop until I release). When I release, it goes down, but keeps going down, even through the platforms.

I would like to be able to swipe anywhere on the screen (any distance) and the character would move up a fixed position with fixed speed, then return to the original position (or platform) at a certain speed.

General Questions:

Gravity: I see a lot of things on gravity, but not sure if I need to incorporate this yet. Would I use gravity to allow the character to fall downward after jumping, or the move function? Do I need to have my platforms have some sort of gravity if I want the characters to not fall through these, and fall through when there is no platforms? Something about collide functions with my platform?

If you can help me out and point me to the correct tutorials, or if there is a big tutorial with quick overviews of each behavior would be very helpful for my future knowledge/options.

Thanks again and thank you GameSalad for this great program, support, and opportunity.

Nathan

Comments

  • vindictuss@yahoo.comvindictuss@yahoo.com Member, PRO Posts: 55

    use collission from the main character to prevent it from going through objects, after actor receive event -> overlaps or collide then choose the objects that you want to collide with.

    and you going to need to make gravity if you want your character to jump then fall to the ground.

Sign In or Register to comment.