Kind of like board game movement

Started by Morgan, Mon 27/09/2004 23:23:45

Previous topic - Next topic

Morgan

I want my character to move like so:


How do I go about doing this? and how do I turn the down and up movements into left/up and right/down or just use/left up and right/down and somehow turn up and down off?

BorisZ

It looks like it's gonna need some arrays. I am not sure, but I think you can use arrays in AGS (chack manual).

TerranRich

Yes, a two-dimensonal array. Check the Technical Archive for help on this.

Basically, the first dimension on the array would be "X", and would store each X-value coordinate from top to bottom. The second dimension ("Y") would store each Y-value coordinate from left to right.
Status: Trying to come up with some ideas...

Radiant

How about using keyboard control, that'd make it easy.

Also, ditch the standard movement routines and put your own in...
in handle_mouse_click, set dest_x and dest_y to the spot the player clicked on.
In rep_exec, move the player closer to that position. Ta dah!

SMF spam blocked by CleanTalk