The Daily Click ::. Forums ::. Klik Coding Help ::. Help with movement for strategy game
 

Post Reply  Post Oekaki 
 

Posted By Message

eblivion



Registered
  14/02/2004
Points
  111
8th July, 2004 at 19:45:28 -

I am making a strategy game in mmf and I am having trouble finding a way to count the number of spaces that the player has moved. Currently, the player moves on a grid, and every direction subtracts from the total steps. I would like to build a movement system similar to Advanced Wars or Fire Emblem where you select the target destination and the character automatically finds the correct path to get there.
Could someone help me out?

 
*******
NETSTAT
*******

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
8th July, 2004 at 20:44:24 -

The easiest (although not the best) way would be to use fastloop to fire off half a dozen invisible squares very quickly that move in a semi-random fasion towards from the origin to the player's destination. As they move they should count the number of steps, and the first to reach the destination would provide the shortest path.

You could adapt the worm movement from this article (plug plug):
http://create-games.com/article.asp?id=1273

 
n/a

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
8th July, 2004 at 20:46:21 -

The easiest way is probably to use the Pathfinding or Grid object.

Grid object: http://www.clickteam.info/extensions/extview.php?id=212
Example: http://www.clickteam.info/extensions/exampledl.php?id=17

Pathfinding Object: http://www.clickteam.info/extensions/extview.php?id=255

 
n/a

eblivion



Registered
  14/02/2004
Points
  111
8th July, 2004 at 20:51:40 -

Thanks!

 
*******
NETSTAT
*******
   

Post Reply



 



Advertisement

Worth A Click