how far can i move on grid

Get help using Construct 2

Post » Tue Oct 02, 2012 7:37 pm

heey,

I have a problem. I am making a turn based stratagy game that has a lot in common with "advance wars".
In this game, you can make units and move this units around the map. but it only can move once a turn and only a few tiles. the mape is grid-based. I want to indicate how far a unit can move, when you hover over it with a mouse. how do i do this?
I Really have no clue and just tried some stuff that did not worked at all.
B
3
Posts: 5
Reputation: 635

Post » Tue Oct 02, 2012 7:46 pm

I have done something similar using an invisible sprite pinned to the unit, and the sprite becomes visible when you hover the unit. The sprite can just be a half-transparent colored grid that is the size of how many steps the unit can move.
B
20
S
5
G
4
Posts: 51
Reputation: 4,139

Post » Tue Oct 02, 2012 8:32 pm

i like your sullotion.
but what do you do when a path is blocked? or when you can not move as far as normal because the units have to walk trough a forest
B
3
Posts: 5
Reputation: 635

Post » Wed Oct 03, 2012 5:12 am

You could make the tiles have invisible sprites on them, becoming visible on certain conditions when hovering the unit (for instance; if distance from grid to unit is less than X make grid visible). This way you can handle 'forest' and 'endoftheworld' movement as well.
Obstacles is the real challenge, I think there is no easy way to implement the movement around obstacles without using alot of different conditions.
B
20
S
5
G
4
Posts: 51
Reputation: 4,139

Post » Wed Oct 03, 2012 7:35 am

Uses a couple rex plug ins. I think pathfinder?

Just a jump start for you.
Use the project anyway you want.

A lot of this can be found in the FAQ I just compiled it a long long while ago.

http://xanderbot.site50.net/map/

http://xanderbot.site50.net/map/map1.capx

Advance Wars Fog of War:
http://xanderbot.site50.net/map/lineosite.capx


Prohibiting movement can be handled a number of ways, Khaz2012-10-03 07:38:20
B
11
S
3
G
2
Posts: 110
Reputation: 2,410


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 34 guests