[solved] Hydra Castle Labyrinth / La-Mulana Jump

Get help using Construct 2

Post » Sun Jul 17, 2016 6:14 am

In games like Hydra Castle Labyrinth or La-Mulana, ceilings do not affect the player's jump arc whatsoever -- the player "pushes against" the ceiling for the duration of the jump instead of hitting his head and immediately falling down.

Does anyone know how I can achieve this with the platform behavior?

What would be really great is a modification to the platform behavior itself so this can be easily applied to enemies too, but I'm open to a solution with events as well.

Examples:
Image
Image
Image
Last edited by Tokinsom on Sun Jul 17, 2016 6:18 pm, edited 3 times in total.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sun Jul 17, 2016 7:27 am

I think the easiest way is to change the gravity if the player has a collision with the ceiling. I made a litte example to show what I mean:
https://drive.google.com/open?id=0B5FlD ... GNBVnN3SmM
B
24
S
3
G
1
Posts: 454
Reputation: 2,171

Post » Sun Jul 17, 2016 8:08 am

@Asmodean Hmm that's close but not quite it. The goal is to not have ceilings affect the underlying jump arc whatsoever. Lowering the gravity while overlapping the ceiling simply makes the player float there for an undetermined time.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sun Jul 17, 2016 2:05 pm

Hey Tokinsom,

I haven't played the games so im not sure if this is exactly what you want but this is how I would do it with platform behaviour: https://db.tt/4ANO0R5t
ImageImage
B
130
S
23
G
7
Posts: 1,078
Reputation: 13,280

Post » Sun Jul 17, 2016 3:21 pm

@GenkiGenga Thanks for the .capx but that has the same problem as Asmodean's - The player hovers for an undetermined or fixed amount of time instead of for the remainder of the jump.

Also worth noting that if the player is jumping while moving, hits a ceiling, and then moves past the ceiling, the jump will continue upwards (provided he's not at the falling end of the complete jump arc).

I think the only way to properly do this is to modify the platform behavior or make a whole new jump mechanic with events :T hmm..
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sun Jul 17, 2016 4:11 pm

Here you go:
https://1drv.ms/u/s!AhHSZHEulqh_gWJwaYIuMqbSYiDZ
It was a little tricky figuring out some quirks, but fairly straightforward in its' implementation.
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Sun Jul 17, 2016 5:01 pm

@Prominent There we go! Simple but effective. I had considered writing my own jump that overrides the platform behavior's but feared it would mess with it too much. Didn't think about just using the existing y vector / gravity...derp.

btw it looks like the y positioning and rounding isn't necessary - just modifying vy and the y vector seems to do the trick.

Thanks all.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sun Jul 17, 2016 5:24 pm

Tokinsom wrote:btw it looks like the y positioning and rounding isn't necessary - just modifying vy and the y vector seems to do the trick.

Ah cool- yeah, the other stuff was what I tried first, so I thought that was necessary, but looks like it's not! :)
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059


Return to How do I....?

Who is online

Users browsing this forum: dop2000, R0J0hound and 5 guests