Platform behaviour issue with next to wall condition

0 favourites
  • 12 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • Hi all,

    I've been playing around with the platform behaviour and noticed that the "next to wall" condition doesn't trigger if there is tilemap collision directly above the avatar:

    https://www.dropbox.com/s/90krbak275kg0 ... 0.c3p?dl=0

    If you push into the wall either side of the central block then the correct animation is shown, but if you push into wall on the far left or right of the level (where the avatar is below a tile) then for some reason the animation doesn't run. Any ideas what the problem is? I can get around it by making my avatar smaller so that there is a gap between it and the ceiling, but that isn't ideal.

    Bonus related issue: If the avatar is exactly the same size as a tile then it won't fit through a single tile width/height gap. Why is this and is there any way to get around it? In the linked demo I've reduced the avatar's collision by a pixel on the top and sides, but it's a bit messy (you can see the overlap between the avatar and the tilemap) and would prefer a more aesthetically agreeable solution.

    Thanks in advance for any help <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Giving this a bump before I resort to logging it as a bug.

  • Read that comment here ?

  • Thanks for posting - I missed that thread.

    I've already filed it as a bug but if what Ashley says is correct and it's not going to be fixed then I'd suggest removing that condition from the behaviour because it is totally unreliable; in a platform game where the avatar is jumping around there will be plenty of opportunities where the avatar ends up in this situation. Either that or you have to build your levels so such a possibility can't arise, which is a pretty heavy restriction.

    TBH I don't understand why the check has to stop after moving it up and registering a ceiling. Why can't the test continue to move the sprite horizontally to test for a wall? If the sprite is on the ground and has a ceiling directly above it doesn't that preclude it from being on a slope? Or do a check on the sprite's angle to confirm whether it is horizontal.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I cant answer does questions.

    But let me suggest another way to tackle this.

    https://www.dropbox.com/s/y7cbazqk1ouvfwc/1012.c3p?dl=0

    Is this what you want to do ?

  • 99Instances2Go

    Thanks for sharing this, and apologies for the delay in responding. It does partially solve my issue and I may well end up going with this so much appreciated, although I'm not entirely sure how this voodoo is working correctly: shouldn't the move left/right animations be resetting to frame 0 every tick? Or conversely, shouldn't the animation continue to loop when against the wall?

    I think the initial problem might arise again with this solution if I wanted to play a different animation when the avatar is next to the wall, a "collide" or "interact" animation for example.

  • Oh it does not loop (step) when against the wall ? I did't notice that. Got to re look at it.

    About: 'shouldn't the move left/right animations be resetting to frame 0 every tick?'

    When you use the action 'Set Animation' .... then the animation will change ONLY when ...

    The new animation is different then the current playing animation, OR, when the current playing animation is in the state of 'stopped'.

    An animation is in the state 'stopped' when you used the action 'Stop' or/and when a non looping animation reached the end of frames.

    Usually i do not set the walking animations to 'looping'. Because they are set on 'Key is down', a continuous 'every tick' condition.

    Key is down (or vectorX =not zero)

    __________Set Animation "walk" (from beginning)

    When "walk" is not looping, that action will do nothing as long as "walk" is playing, when "walk" is stopped (animation is at the end), that action will restart the animation, effectively looping the animation.

    I did not check this on the capx, btw.

  • Oh it does not loop (step) when against the wall ? I did't notice that. Got to re look at it.

    It's better in this case for it not to be looping when against the wall.

    About: 'shouldn't the move left/right animations be resetting to frame 0 every tick?'

    When you use the action 'Set Animation' .... then the animation will change ONLY when ...

    The new animation is different then the current playing animation, OR, when the current playing animation is in the state of 'stopped'.

    An animation is in the state 'stopped' when you used the action 'Stop' or/and when a non looping animation reached the end of frames.

    Usually i do not set the walking animations to 'looping'. Because they are set on 'Key is down', a continuous 'every tick' condition.

    Key is down (or vectorX =not zero)

    __________Set Animation "walk" (from beginning)

    When "walk" is not looping, that action will do nothing as long as "walk" is playing, when "walk" is stopped (animation is at the end), that action will restart the animation, effectively looping the animation.

    I did not check this on the capx, btw.

    I was not aware that the animations worked like that - interesting. I figured that the anim would restart every time it hit the "play animation from beginning" action, regardless of whether it was currently running or stopped. Thanks for enlightening me!

  • Does this makes sense to you ?

    https://www.dropbox.com/s/y7cbazqk1ouvfwc/1012.c3p?dl=0

  • I think that's the same file as last time?

  • Afraid that is correct. Still dont have that 'feeling' with Cloud Storage. Let me try again.

    https://www.dropbox.com/s/croi1um4x1xmu ... s.c3p?dl=0

  • That's very helpful, massive thanks!

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