collision on moving object ( with Sine Behavior )

Discuss game development design and post your game ideas

Post » Tue Dec 06, 2016 12:13 pm

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 ?
B
2
Posts: 1
Reputation: 152

Post » Tue Dec 06, 2016 1:09 pm

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.
Image
B
108
S
24
G
18
Posts: 1,372
Reputation: 22,817

Post » Fri Dec 09, 2016 2:50 pm

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.
B
2
Posts: 5
Reputation: 160


Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 3 guests