How do I tile based movement with mouse

Get help using Construct 2

Post » Sat Jul 04, 2015 12:04 pm

Trying to set up a tile based movement, with click to move, able to move a set amount of tiles based on a variable, walking around obstacles, with the character centered in the tiles.

I'd explain what I've tried but I don't want to over complicate what I'm looking for.

When I get enough reputation I'll upload what I have.
B
8
Posts: 23
Reputation: 360

Post » Sat Jul 04, 2015 12:56 pm

If I understand, you would like to move to a position once clicked and based on grid/tile movement?
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sat Jul 04, 2015 2:05 pm

To move to a position within a given range yes.
B
8
Posts: 23
Reputation: 360

Post » Sat Jul 04, 2015 2:09 pm

Like moving a king on a chess board but able to move further.
B
8
Posts: 23
Reputation: 360

Post » Sat Jul 04, 2015 7:17 pm

Something like this?

https://drive.google.com/file/d/0B27TG57JCwl_ZkplaWFSVDIzVE0/view?usp=sharing

Just click on download on top of the page. I did a very simple capx file
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sun Jul 05, 2015 6:49 am

Thanks for the post back, now we have a base to go off of, I can try and play around with what you have and may or may not be able to move forward. If I can get it closer without resolve I'll link the Capx file I think I have enough reputation to add files now.

With this I'm wanting the square to move towards where the mouse button is pressed, and avoid obstacles like walls to get there.
B
8
Posts: 23
Reputation: 360

Post » Mon Jul 06, 2015 12:05 am

Maybe I can make this a little more simple and figure the stuff out that I know on my own, sorry for the confusion.

I'm wanting to use pathfinding on a player but center them on a grid. Possibly center them on the squares they walk through as well.
B
8
Posts: 23
Reputation: 360

Post » Fri Jul 10, 2015 6:47 am

I've made some progress with the movement, this is "BASICALLY" what I'm looking for. Two problems I'm currently having are in order to make it center to the tile I'm having to set the X and Y location to the tile when it gets close. This makes the character "jump" or "teleport" I'm trying to make it a little more smooth moving.

Also while the player is moving he seems to make unnecessary wide turns. I'm going to turn this into an actual player character I feel like its more like a boomerang.

capx:

https://www.dropbox.com/s/qnnpyigtwihop ... .capx?dl=0
B
8
Posts: 23
Reputation: 360

Post » Tue Apr 25, 2017 4:58 pm

This is a really old post, but did you find a solution for the problems? @Xore
B
3
Posts: 4
Reputation: 243


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests