Move enemy sprite towards player on a grid

Get help using Construct 2

Post » Thu Dec 19, 2013 9:40 pm

My son and I are trying to create a simple old school tile based fighting game. We have a hero that moves along the grid, we would now like the monster to move along the grid towards the hero. Wondering how to best achieve this. Any help would be much appreciated.

Sample project is below ...

https://dl.dropboxusercontent.com/u/22861130/ForeverQuest.capx
B
17
S
3
Posts: 33
Reputation: 1,666

Post » Fri Dec 20, 2013 1:13 am

I suggest using an array and updating the position of the enemy(ies) on the array mathematiccally, and each turn or each tick, draw the in corresponding space in layout.

You could also use pathfinding behaviour for the enemy, and correct it's position each time it moves to create the grid feeling. You may also need to stop for a half second every time it moves some distance to create the grid-movement effect. Even though the pathfinding behaviour uses an unseen grid, I think it still is very smooth so movement will not look like grid based.

Just on the top of my head though.
B
18
S
4
G
1
Posts: 332
Reputation: 3,149


Return to How do I....?

Who is online

Users browsing this forum: t redeemed t and 11 guests