How do I “jump” in a Top-Down game.

Get help using Construct 2

Post » Thu Jul 03, 2014 8:20 pm

What I try to achieve is for a solid object, to be able to “jump over” (passing through) a solid obstacle when a button is pressed. This without using physics and without passing through other solids.
I have attached a simple .capx as an example.
As the game world is filled with solids (jumpable obstacles, not jumpable obstacles and enemies that keep following the player), the player should be able to only “jump” over the obstacles but not being able to jump over (passing through, other solid.
In the .capx, attached, I try to explain the scenario that is composed by:
-a player
-a enemy that follows the player
- an obstacle (like a fence)
-And a box
The player and the enemy cannot pass through any other solids. But by pressing a button, the player should be able to jump over the obstacles, but not over the box.
At the same time, the enemy will still not b able to jump over the obstacles.
Any contribution would much appreciate!
You do not have the required permissions to view the files attached to this post.
Posts: 10
Reputation: 220

Post » Thu Jul 03, 2014 8:55 pm

Not yet had time to check the capx sorry, but one solution would probably be to switch to an animation "jump" and during that animation disable the behaviors on the player (solid and movement), and then force the player to move forward until the animation ends. Do a check before triggering the jump to make sure the player is facing towards an obstacle and is allowed to jump over it (eg: overlapping a sprite made invisible called AllowJump).
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
Posts: 2,274
Reputation: 23,027

Post » Thu Jul 03, 2014 10:10 pm

I made an example...


The problem is, I'm tweaking the fences solid behavior, so, when the player jumps, the enemies can cross the fences too. I'll try to work around this issue, but, for now, you can check this version! :)
You do not have the required permissions to view the files attached to this post.

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
Posts: 718
Reputation: 4,008

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests