How do I detect wall when walking roof?

0 favourites
  • 2 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,

    I am having a problem with an enemy. It is a stupid problem, but I dont know why is happening. This enemy has platform behaviour, and he can walk on the floor, and also he can invert his height to walk on the roof. The problem is when he is patrolling and he has wall to his sides, he doesnt mirror.

    On the floor it works fine, but when he is up, seems like he is not detecting the walls. Why is this happening?

    the pseudocode is:

    if(enemy is mirrored)

    ----- Simulate press left

    ----- if(enemy has wall to left)

    ---------- enemy set not mirrored


    ----- Simulate press right

    ----- if(enemy has wall to right)

    ---------- enemy set mirrored

    This works fine on the floor, but no when the height is negative. I tried to change the mirror just in case construct detect the negative height as mirrored, but that iks not the problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know if this would help but have you tried 'flipping' the sprite instead of having -height, it could be a possibility that the negative height might mess with the platform behaviour. Don't know if this will help, thought I might as well just say just in case it does...

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