collision on moving object ( with Sine Behavior )

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hi all,

    I am learning how to use Contstruct 2 and up to now it seems to be the best game development kit I ever used.

    Though I ran into a little problem I do need some help with....

    I made this maze-like game ( like pacman ) but I want to add moving walls into the maze.

    So....

    I made a player, an enemy, wall sprites and a door sprite ( a moving wall... )

    The Enemy uses pathfinding, every second, to find it's way to player.x , player.y coordinate.

    That works superb.

    But when I put in a Door sprite, that moves using Sine Behavior, the Enemy runs THRU the door, it doesn't collide with it. The Door aswell as the Enemy have Solid Bahavior. The Player is NOT able to move thru the Door sprite, only when it is open, but the Enemy is.

    Hope my question is clear, how do I make the Enemy stop for the moving door until it opens ?

  • You need to refresh the collision areas by "regenerating" it with an action in you events.

    In the object with pathfinder, use one of the Regenerate actions of this behavior, each one works better for a type of situation, and I suggest you to avoid regenerate the whole map, so, using the regenerate around an object should be enough.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Many action and adventure games place characters in some form of labyrinth—the player character must solve the maze to achieve gameplay goals, and enemy characters must work their way through it to present a challenge to the player. The process of determining how to traverse a game board, maze, or other navigable space is called pathfinding.

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