Disable platform behavior's 'sticking' to moving objects

0 favourites
  • 9 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hello there! I'm working on a side project that involves a platform movement object going over an unlimited scrolling tilemap - to accomplish the unlimited scrolling, I have the tilemap and player slowly move to the left at a constant rate, and periodically shift it a tile's width to the right every time it moves a certain amount off the screen, as well as simultaneously shift all of the tiles along with it by transferring the tilemap's data to an array, deleting a column, and then transferring it back in one tick - giving the illusion of continuous movement.

    Unfortunately, because the platform behavior will automatically shift position along with whatever the object is standing on automatically, this causes various problems - like the player sliding at double speed to the left while standing on solid ground, as well as jumping 16 pixels every time the tiles reset. I've tried to compensate for this behavior in my code by disabling the scrolling movement on the player while the player is standing on solid ground, but this doesn't produce satisfactory results - you can still see the offset for a frame.

    I would just re-code the platform behavior from the ground up using custom movement, but I would like to avoid it if possible - is there any built-in way to remove the built-in behavior meant to emulate moving platforms?

  • Why don't you just make an invisible/immobile ground object and apply the solid behavior to that?

  • I'm not just doing a flat scrolling floor - I'm doing a dynamically generated landscape of tiles. Otherwise, the invisible / immobile ground thing would work, but, alas!

  • You'd need to modify the platform behavior itself to do this. Maybe you could ask forum user ruskul about this, they made a recent post about editing it for collision filtering.

    But if your landscape is completely orthogonal then you should just roll your own because you don't need to implement the two most difficult aspects of a platformer: slopes & moving platforms.

  • Can you simply adjust the height of the invisible floor to match the present height of the ground the character is standing over?

  • I ended up coding up my own not-perfect-but-functional platform movement based on the custom movement behavior - but it would be pretty nice to be able to turn the 'sticking' aspect of the behavior on and off! The height-changing floor is a clever solution, but not really one that'd mesh well with other aspects of my game - I may end up giving it a try anyway, though!

  • Just started looking into this behavior. IMO it's an important feature that should be optional in the Platform plugin but isn't! Maybe Ashley can add this in with future versions. For now I'll take a look at the js code, and if I can't disable it I'll just make a custom solution.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there everyone! Sorry to resurrect an old thread, but I revisited this problem on a whim and found a solution:

    I just made a copy of the Platform behavior called Platform (non-stick) - it's identical, except I found this block of code and commented it out. It seems to work just as intended with no problems! This would be really useful to have as a simple toggle available in the behavior properties, though!

  • That is well worth revisiting the thread for. I think you can tweak the solid behavior in an action block.

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