0 Favourites

Access to 'Solid' Attribute

This forum is currently in read-only mode.
  • Hi everybody, first post, very impressed with the software! Thank you devs for developing something like this under the GPL!

    I was wondering if it was possible to access the 'Solid' attribute via events. I am trying to build a little platformer and would like to switch off the collision detection on platforms & slopes that are above the player (so he can jump & walk through them from below). This is easy for platforms (I compare the Y-Positions of two ImagePoints on platform and player), but for slopes it gets tricky. It would be a lot easier if I could switch the 'Solid' attribute and still benefit from the built-in collision detection to determine wether or not to toggle the slope solid. As it is right now, I am switching off the collision detection by setting the 'Collisions' property to 'none'. With collisions off, however, it gets tricky to check when e.g. the player is overlapping the slope sprite and jumps (but does not leave the slope's bounding box) above the slope - which should toggle the slope solid.

    (example cap here http://www.scirra.com/phpBB3/viewtopic.php?f=16&t=2119)

    Sooo... is there any way to do this besides a) using phantom sprites for the detection or b) calculating the y-height of the slope myself (with lerp or similar) and comparing it with Imagepoints on the player? And if not - which of the two would you recommend? :)

    Thanks for your time!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Setting the collisions like that is currently the only way to turn solids on and off at runtime.

    There is a jump-through platform feature being added to the platform behavior though, if you can wait for it. Otherwise, you'll have to code your own custom collisions.

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