Detecting obstacle while moving along path

0 favourites
  • 3 posts
From the Asset Store
Obstacle Impacts and Cartoon voices, will makes your game more funny!
  • Hello!

    Thought I would update my problem here. I have come across an issue that I'm struggling to resolve.

    Upon pressing a switch, an obstacle tile moves well out of the way.

    Upon releasing a switch, an obstacle tile moves back to its original spot.

    If I select a spot as destination and start pathfinding, upon releasing the switch that I'm pressing, the obstacle returns to its original spot but the player will walk through it. I've not been able to solve this with regenerate obstacle map. Has anyone come across an issue like this or does anyone have a quick way of solving it?

    If it's not entirely clear what I want is for the player to detect that the obstacle tile has returned to its original spot and therefore block the player as he moves into it.


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to call 'find path' again after regenerating the obstacle map for any objects that are already moving. And don't forget that the obstacle map won't be updated until the next tick so you need to wait a bit before calling 'find path'.

  • Ah of course! Thanks for the help <img src="smileys/smiley20.gif" border="0" align="middle" />

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