How do I make a Top down player jump over a small gap

Get help using Construct 2

Post » Thu Mar 05, 2015 6:33 pm

I am looking to make it where my player can hop over small gaps, like in the Legend of Zelda.
the first min of this video shows what I am trying to do
https://www.youtube.com/watch?v=EKxtkgH4R8M

I understand that the jumping is a animation, but I am trying to get it where the player can go through the hole sprite only when he is jumping.
I any help is appreciated.
B
29
S
6
G
1
Posts: 93
Reputation: 3,020

Post » Thu Mar 05, 2015 10:04 pm

Assuming you're using a tilemap:

event: Keyboard.onKeyPressed(Space)
- event: Keyboard.isKeyPressed(W)
-- event: compare two variables (tile(player.X, player.Y - 1) = Tile.hole)
--- action: play animation and move over hole tile

Repeat above three lines for a, s and d.
Nothing goes unanswered!
B
22
S
5
G
1
Posts: 430
Reputation: 3,388

Post » Fri Mar 06, 2015 1:40 am

thank you for the quick reply.

I have not really used tilemaps before in construct but I understand how to added them in the layout, just not have to use them in the events.
is there any chance you can give a capx with an example?
B
29
S
6
G
1
Posts: 93
Reputation: 3,020

Post » Fri Mar 06, 2015 4:07 pm

Working on it now

EDIT: See attached for the adventures of Jeff the robot in the world of identical 16x16 noise tiles.
You do not have the required permissions to view the files attached to this post.
Nothing goes unanswered!
B
22
S
5
G
1
Posts: 430
Reputation: 3,388


Return to How do I....?

Who is online

Users browsing this forum: dandeliongames, Morcego, Per3za and 7 guests