How do I jump off a cliff? not collide on different layers?

0 favourites
  • 9 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hello everyone!

    I am making a game similar to Legend of Zelda a link to the past. and am I trying to figure out how link is able to jump off a cliff.

    I'm also trying to figure out how depending on a layer it seems that you can collide with some monsters but not others depending on which plan the main character is on.

    any idea's???

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The first question is unclear to me..

    The second question could be handled by layers depending on how you have your game set up..

    Player on collision with monster

    system compare two values player.layername = monster.layername

    player destroy

  • The first question is unclear to me..

    The second question could be handled by layers depending on how you have your game set up..

    Player on collision with monster

    system compare two values player.layername = monster.layername

    > player destroy

    LittleStain Incredibly, you have solved my biggest problem without knowing it, thank you for .layerX, I dont seen it before!

  • in response to the first question, the game is bird eye view, somehow the main character can press against a ledge/cliff and seemingly jump off of it as if the wall isnt a solid object anymore and land on the floor below it

    i'm basically trying to achieve this wondrous feat!

  • If I'm correct, those only happen on specific places of the cliff right, you can't jump from any cliff (for example on the second picture, only the edge on top of the square where Link actually is can be jumped from, no other part (darkened) of the cliff, right ?)

    A possibility is to have an invisible sprite to act as a "way" on top of the ledge to act as "possibility trigger".

    When Link is overlapping the blue box/trigger and actually moving at a greater Y than the bottom of the box, it is considered that the jump is effective.

    From there, you ignore the player's inputs, and actually move Link by yourself down the yellow arrow for X pixels (the amount can be an instance variable of the blue block).

    Once the amount of pixels travelled, you give back the hand to the player and "situates" back the character in the world where it should be (that is to say, down at the foot of the cliff, on a new layer likely. The next layer name can also be an instance variable in the blue rectangle.)

  • Fall is not the problem. (Physic Behavior)

    The problem is to walk on a solid or solid like... I think thats currently impossible in this kind of game, isnt it?

    We need a upgrade on Physic for topview games. But nobody probably do this.

    Kyatric Yes, or a workaround. I have almost only workarounds...

  • i suppose its worth a try when you collide with the the object to make the event function to have the wall solid behavior disabled for the duration of the jump... although it would mean that npc's and monsters would just merge into the wall if they move. hmm

  • I've solved this in my game. I have the same mechanic where you can jump down off of ledges but not back up. Here's an image for how I have it set up:

    My events are basically if you're moving down, it disables the solid, changes the player animation, and accelerates the player downwards until they hit the landing object. Everything is reset back to normal controls at that point. Just be sure the landing is wide enough that someone wouldn't be able to get around it and accelerate downwards forever or something crazy (or disable lateral movement, which I don't).

    Some of that is for state management in my game, and I use the bullet behavior in tandem with the 8-direction behavior for a number of environmental things. I'm sure someone has some magnificent way to make it more efficient or whatever, but this works perfectly well.

  • It looks great thanks! ill have to give it a try when i get the chance!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)