platform player overtake a few pixel difference in level

0 favourites
  • 8 posts
From the Asset Store
Vintage steam pixels for your UI! 125 unique assets in a single pack!
  • Hello everyone. Is there a way or option for a player sprite whit platform behavior to overtake a few pixels difference in level ? i have a solid sprites, not perfectly aligned, as ground And when I walk in those points, the character stops..

    I would like to be able to continue walking if the altitude difference is not so much.

    Thank you in advance for who responds

  • Hi,

    It sounds like you are using graphics for collisions. That's not a good idea. Use an invisible PERFECT collision box sprite to serve as the floor while you put the graphics on top of it using PIN behavior.

    That allows you to have not-perfect graphics of any kind while your floor remains PERFECT.

    Good luck.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's not the point. I already use the invisible collision box but playing a very irregular ground is normal that some points are slightly uphill, I think the Player blocks too easily at these points, for example the Blender Game Engine has an option that allows me to Setting how many pixels I want to jump over to the Player, I wondered if that was possible on Construct.

  • I believe almost anything is possible. Naturally different tools work differently and some are more advanced than others (but also more complex).

    So if you know from testing that all your floor is totally OK and only a specific area creates a problem due to some weird collision issues - well then i'd suggest you simply modify that area a little bit or place a couple of invisible sprites such as little squares or circles in the trouble areas for a simple/quick solution.

  • well then i'd suggest you simply modify that area a little bit or place a couple of invisible sprites such as little squares or circles in the trouble areas for a simple/quick solution.

    I thank you for the advice, yes, that's exactly what I am doing, but I was hoping for some trick to do what I was asking. I also noticed that when the Player Takes Speed does not hang while it stops in proximity and then starts again and finds the slight difference in height instead. So it might be something related to some kind of intrinsic physics of the platform behavior..

  • technically the player can go up of 1 pixel each pixels officially, but my guess would be that you could prefer to use actual slopes or align your boxes (using for exemple the grid of the layout view for an easier time editing) to prevent this kind of issues.

  • You could position the boxes with events in an automated way so that you don't have to manually position them to eliminate corners to snag on.

    Add a Sprite that you use to place dots along the floor. The events would the create a box between each dot.

    You need to add a family called otherdot which contains dot. This is so we can pick two.

    The box Sprite needs to have it's origin at the top left.

    Finally the dots need to be created left to right. You could sort them by X or by some other means but that would make the events more complex.

    Paraphrased the events loop over the dots and if it's not the last dot it stretchs a new box to the next dot.

    Start of layout

    For each dot

    Compare: loopindex<dot.count-1

    Pick otherdot instance loopindex+1

    --- create box at dot.x, dot.y

    --- box: set angle towards otherdot.x, otherdot.y

    --- box: set width to distance(self.x,self.y,otherdot.x,otherdot.y)

  • thanks guys

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