How do I Jumping

Get help using Construct 2

Post » Tue Apr 07, 2015 8:57 pm

Hi,I decided to do my game in construct 2 since a lot of bugs in construct classic,but i dont know how to make jumping animation.
How to do it,i want my character jumping when spacebar is pressed.
Also i did character choosing menu,and theres 2 characters-castaway and pirate.
I set that pirate should be mirrored if left arrow is pressed,but it doesnt work,why ?
Heres capx
PS: sorry but this game is going to be made for friends,so it isnt in english.
h t t p : / / s p e e d y . s h / D j g t u / r a d k e . c a p x (delete spaces to download capx,i havent permissions to put full link ;/)
Posts: 13
Reputation: 230

Post » Tue Apr 07, 2015 11:02 pm

There is "Is on ground" and "Is falling" conditions in "Platformer" behavior.
Do it like this:
If (Is NOT on ground)
if (Is falling) - set animation "falling"
else - set animation "jumping"
Posts: 238
Reputation: 7,915

Post » Wed Apr 08, 2015 12:02 am

You need to use "Simulate control" action under platform behavior actions for sprite.
Put it in a keypress event with action simulate control platformer jump.

I did some minor tweaking on your capx. It should start at menu now by default and goes to the correct layout when you click a character.
I put the movement behaviors into groups for each character and have it activate/deactivate the other when a different character selected to avoid nasty control bugs (like your lack of pirate control). Both characters mirror and unmirror correctly but the animations need some work :). (click the download arrow in upper right corner of screen)

It is far from optimized but it "works" now. One tip though, I see both characters use the same level layout design wise. Why not simply have one layout instead of two and use a spawn sprite event for the chosen character, would be much more efficient.
Last edited by chrisinfinger on Mon Sep 05, 2016 10:36 pm, edited 2 times in total.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
Posts: 636
Reputation: 9,333

Post » Sat Apr 11, 2015 7:28 am

Thanks,works at all.
Posts: 13
Reputation: 230

Return to How do I....?

Who is online

Users browsing this forum: Cha0tiXGamer, GraveSoul, MaujDeveloper and 7 guests