In an attempt to add a more strategic element to one of my projects, I want to limit movement.
In more detail, I roll a dice, and I get a certain number of moves; with this, I can move that many squares. However, due to different routes that you can take, I would like the player to be able to move 'backwards' to where he came, and thus see where s/he would land taking a different route.
I know how to handle limiting movement, but, I'm stumped on how to go about 'reimbursing' movement points for going back to where they came from at the start of their turn.
My thoughts led to creating an object in the location the player started at, and then using get_dist() or something similar.
Any help/thoughts/ideas?
ID:172728
Apr 4 2004, 9:03 am
|
|
Apr 4 2004, 9:45 am (Edited on Apr 4 2004, 11:44 am)
|
|
I had started working a game that used move backtracking, but it became my 4k entry so it got chopped. It bascially just kept a list of traversed turfs and whenever a player moved it checked to see if that turf was the last one in the list. If it was, then that was the turf they had previously been at so you add a move back onto their possible moves and take that turf out of the list.
|
It'd be easier just to generate a list of turfs that can be reached, and just constrain them to those turfs.
|
You don't necessarily need a list of turfs for this. You can also use directions without a list at all.
turf When the turn begins, set a var that says which turf was the starting location. Then use a similar loop when you confirm movement to un-highlight every turf. mob Lummox JR |